0
votes

I have seen so many links on stakeoverflow that are using some code to hide out of stock product. But its not working for me. I want to hide out of stock products from whole the site.

No matter the product is simple or variable, it should hide the product from whole site. In case of variable product if any of its attribute have 'Out of stock' state then it should hide that product.

1

1 Answers

2
votes

WooCommerce has an option for that at:

Dashboard > WooCommerce > Settings > Products tab > Inventory page > Out Of Stock Visibility: Hide out of stock items from the catalog