Hi,
Yes you can easily achieve this by adding following code in your functions.php file.
add_filter('wfs_get_products_args', 'itsmeleo_update_shortcode_args');
function itsmeleo_update_shortcode_args($args) {
global $shortcode_args;
$args['tax_query'] =
array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'exclude-from-catalog',
'operator' => 'NOT IN',
),
);
return $args;
}
Thread Starter
Chris
(@seoptseseo)
Appreciate the reply, I have added this and it seems to duplicate all of my items. I had each food item showing 4 times, as it showed every meal under each category.
Maybe an error in the code but just wanting to hide things that have product visibility set to hidden. Thanks for your time on this
Hello @seoptseseo
We are going to look into it. If any quick solution can be provided we’ll post it here. Otherwise you can expect a fix with next version update.
Thanks & Regards,
Team WP Scripts
Hello There,
With new version 1.3.8 the above enhancement has been added. So, the products marked as Hidden will be kept hidden in Food Store menu as well. Thank you for your patient and your support.
Regards,
Team WP Scripts