• Resolved Chris

    (@seoptseseo)


    So within woocommerce you have the option to hide certain products, which is helpful for my business as we constantly change the menu. Although when i hide some items, they are not being hidden in the food store section. Any ideas? is there some code i can add or modify to only show products that aren’t hidden? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    Plugin Author WP Scripts

    (@wpscripts)

    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

    Plugin Author WP Scripts

    (@wpscripts)

    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

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hidden Menu Items’ is closed to new replies.