Hide WooCommerce Product Categories on Shop Page or other Page

You can hide certain WooCommerce product categories from the shop page or other targetted pages, by using an action called woocommerce_product_query

Add it in your theme via functions.php and it works like so…

So the action is wrapped in a conditional statement that targets the pages you want the Product Categories to not display.

Then in the $tax_query array set the terms value array to the actual Product Categories you need to be removed.