How to hide WooCommerce products from search by category

I found myself in the situation where I had to give the client the possibility to hide some of their products from search, so they can manually send the product urls to their clients. The way I got around it at the time was to create a product category called Hidden and use the snippet below, which you can paste in your theme’s functions.php file.

Continue reading “How to hide WooCommerce products from search by category”