I am trying to use Widget Logic to display a widget only on posts withing a certain category. As far as I am aware
is_single() && in_category( 'x' ) should work.
As I am trying to use this on a WooCommerce page i am using
is_single() && in_product_category( 'x' ) but I get an error saying
Call to undefined function in_product_category() in /home/*/wp-content/plugins/widget-logic/widget_logic.php(284) : eval()'d code on line 1
I also tried
is_product() but it just seems that it won't accept the
in_product_category line as I get the same error (
is_product_category works fine but I don't need it here). Any ideas how I can fix this? I need this badly as there are many categories of products that need different informations and manuals on the sidebar!