How to Remove Stock Messages from WooCommerce Products

WooCommerce has pretty decent inventory control capabilities baked right into the base plugin. You can turn these on for each product in your store using the “Inventory” tab of the Product editing screen inside of the WordPress admin.

Manage Stock in WooCommerce
You can manage stock from the WooCommerce Product admin

You can do all sorts of useful things with this tab like set the amount of a product you currently have in stock, decide whether or not to allow an out of stock product to be backordered and even tell WooCommerce to email you directly when a stock amount on an item reaches a certain level.

One of the defaults settings, once you’ve checked the “Manage stock?” box on a product, is to add stock messages to each product’s page on your store like so:

Stock Message in WooCommerce
An example of a Stock Message in WooCommerce

This is a really useful way to inform potential customers how many of the item they are interested in is available but you don’t always want to broadcast to the public your inventory levels.

If you want to remove these stock messages from your store you’re going to have to make some changes to your WordPress theme or use our Remove WooCommerce Features plugin and save yourself the trouble of editing any code and messing up your site beyond your capabilities to fix.

How to Remove Stock Messages from WooCommerce by Editing Your Theme

If you have any kind of experience editing WordPress themes or just doing some basic file modification for WordPress this shouldn’t be too difficult. Any of you who get nervous about things like FTP or getting into the inner-workings of your store might want to consider hiring a freelancer to help you take care of this process.

Go into your theme’s directory on your server and find the functions.php file. You’re going to want to add the following lines of code to the file, save the changes and then upload the file back to the same directory in which you found it.

add_filter( 'woocommerce_get_stock_html', 'my_remove_stock_messages', 10, 2 );
function my_remove_stock_messages( $html, $product ) {
    if ( $product->is_in_stock() ) {
        $html = '';
    return $html;

You should see the change right away if all has gone well. The next time you pull up a product on your site that has inventory levels the stock message should be gone. If you still see theme, or even worse your site is broken, try and restore from a backup or reverse the changes you made to functions.php.

It’s important to remember that, if you are doing this yourself, any changes made to functions.php will be erased the next time you run an update on your theme. There are ways around this by using a child theme but, again, if reading all of this makes your eyes glaze over it is probably best to hire someone to maintain this change for you or give our plugin Remove WooCommerce Features some consideration.

How to Remove Stock Messages from WooCommerce without Writing Code

One you have purchased Remove WooCommerce Features and have it installed and activated on your website it’s just a quick three step process to remove the stock messages from your products.

Step #1

Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says “Remove Features.”

WooCommerce Admin Menu

Step #2

Find the setting for “Stock Messages” and click the checkbox so that it’s marked like so:

Remove WooCommerce Features - Stock Messages

Step #3

Press the “Save Settings” button.

Save Settings Button

You’re all set. As soon as you save your settings in the plugin the stock messages on your products will no longer be displayed.

Stock Message Removed from WooCommerce
An example of the stock message removed in WooCommerce

This setting will persist no matter what theme updates you do going forward. It will even apply to any new themes you choose to use in the future. So you won’t have to worry about re-editing your theme’s functions.php file or paying a WordPress developer by the hour to manage the change for you.

In addition to stock messages, Remove WooCommerce Features supports the option to disable a bunch of other default WooCommerce aspects as well like:

There are well over 20 total features our plugin can help you disable with just a few clicks of your mouse. You can read the entire list of features the plugin supports here on our site.