Reading Time: < 1 minute
Lets say you have an eCommerce business selling customized coffee mugs. Each mug you sell gets a custom message printed on it and you just fill the orders as they come in. You know each mug gets customized before shipping out, so you don’t really need to track the inventory.
If you happen to run out of your local stock of blank mugs then you’ll just buy a new box, no big deal. In a case like this you may track inventory, but don’t actually need WooCommerce to report this. So how can you hide the ‘In Stock’ message on your product pages?
How do I hide the “In Stock” message on my product pages?
Some store owners would prefer not to show the “In Stock” message. This can be useful when you sell custom made, or to order, goods that may not be in inventory until an order is place.
Making sure your catalog of products doesn’t display the “In Stock” message is as simple as adding a code snippet to your site’s functions.php file.
WordPress Code Warning:
This article features code changes, or snippets, that you can make in your active themes function.php
file. If you are unfamiliar with this task, or want to brush up, we have an article on Managing code snippets in WooCommerce
. The technique provided can be used for both WordPress and WooCommerce sites.
Keep in mind that you should never make code changes on your production site. You should always test code changes like this in a local, or development, version of your site first. That way if something goes wrong your customers won’t see any errors.