I am working with WooCommerce since last few days. I came across a situation where i need to hide “Out of Stock” products from product listing page, category/archive page. I will show you how to hide Out of Stock products from listing page. Along with this, i notice that on category listing, it shows products count in bracket. This includes the Out of Stock products. I will show you the ways How to hide Out of Stock products & its count in WooCommerce step by step.
How to hide Out of Stock products in WooCommerce
- Login to your WordPress Admin Panel
- Go to WooCommerce > Settings
- Click on Inventory Tab
- Find Out Of Stock Visibility Option and check it to hide
- Click on Save Changes and you are done
How to fix Out of Stock products count in WooCommerce
In case if you see product counts for categories are showing a too high number, this is a fixing for you. After follow these steps, it will force the system to recount all the products of category when next time category page is loaded.
- Go to WooCommerce > System Status
- Click on Tools Tab
- Click on Recount Terms beside Term counts
- Click on Clear transients beside WC Transients
- thats it. You are done
Do you have questions like How to hide Out of Stock products & its count, hide out of stock products from listing, recount product’s count on category page than above will fix the all your questions.
If it helps you, please consider to share it in social media so it might help to your friends as well. Comment below if you have any questions or problem.