Compatibility Problem With WooCommerce Auto Category Product Thumbnails
-
Hi,
I’ve installed WooCommerce Auto Category Product Thumbnails on my website in order to automatically use a product thumbnail as a category thumbnail if no category thumbnail is set.
It’s working with all the other themes but there is a problem with the Woodmart theme.
The original placeholder is still showing up under the generated category thumbnail. Please check my screenshot for more details.
Thanks
Hello,
Try to add the following PHP code snippet to the child theme functions.php file to fix this
add_action( 'init', function() {
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
remove_action( 'woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10 );
}, 1100 );
Regards
Hi,
Thanks for your reply. I’ve added this snippet to the child theme functions.php file and it’s still showing the default placeholder under the generated image.
Hello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we could check it? Also, switch to the default WordPress theme so we can compare how it works.
Thank you in advance
Hi,
I’ve enabled the default Storefront theme. I’ve also disabled the snippet in functions.php.
Please, use our Private content field to post your website access. Also, try to replace the previous code with the following one
add_action( 'init', function() {
remove_action( 'woocommerce_before_subcategory_title', 'woodmart_category_thumb_double_size', 10 );
}, 1100 );
It’s working! Thank you very much for your good support. I will recommend it!
Thanks again & have a great day.
Great, you are welcome! Feel free to contact us if you have any questions.