GET FREE VERSION GET THE PRO VERSION

How to create ‘Stock status’ labels

Learn how to replace default 'Stock status' labels with the labels created via 'Advanced Woo Labels' plugin.

In this article

Overview

In this article we will cover the topic about how to replace the default Stock status label of your theme with a new one created via Advanced Woo Labels plugin.

Stock Status along with Sale Status are the most general and widely used labels. Almost every WordPress theme has its own styles for these labels. Therefore, the question of their customization is quite important.

Process of creating new Stock Status labels looks like that:

First we need to hide the default label. This can be done via built-in plugin options.

Then we need to create a new label that will show stock status for each shop product. This can be done via a special text variable.

Alternatively we can create different labels for each available stock statuses ( In stock, Out of stock, On backorder ). So for each of such labels we can set its own styles, position, etc.

Below we will cover all these steps.

Note: in another article we covered the steps of creating another very popular label type - On Sale. Pay attention to it if it's relevant to you.

Replace the default theme label with the new one.

Replace the default theme label with the new one.

Hide default 'Stock status' label

First of all we need to hide default Stock status labels. After that we will create new ones that will be shown instead.

All you need is to go to the plugin settings page and set Show default 'out-of-stock' label option value to Hide.

Option to hide default stock status labels

Option to hide default stock status labels

After this just check your shop pages to make sure that all default labels to display products stock status are hidden.

Create new 'Stock status' label

Now we can start with creating a new label that will display product stock status.

Open Adv. Woo Labels page and click Add Label button.

Then follow these steps:

1. First of all we need to specify label display conditions. Most probably we want to display this label for all products. In this case we can set the following display rule:

Visibility -> not equal to -> Hidden

Label display conditions

Label display conditions

2. Then we need to set label text. In our case it must show current product stock status. So we can use the {STOCK_STATUS} text variable. Just add it inside Label text field.

Label text option

Label text option

3. Additionally, set any other option for this label. For example - styles or position. When ready - just hit Publish button.

4. We are ready. Open shop page and check for newly created label - it must be visible for all products of WooCommerce shop.

New stock status label

New stock status label

Create new 'Stock status' labels with different styles

Alternatively instead of creating only one label that will show all possible stock status values we can create a separate label for each of such statuses.

First of all it is very useful if you want to create unique styles for each of such labels. For example - set red color for labels that displays Out of stock stock status.

To create such labels we will use a special display condition Stock Status with different values for each stock status of the product.

Here is an example of creating label for products with Out Of Stock stock status:

1. Create a new label. Then inside Label Conditions box set the following condition rule:

Stock status -> equal to -> Out of stock

Label display conditions

Label display conditions

2. Then set the content for label text. Set something like Out of stock inside Label text field.

Label text option

Label text option

3. Additionally, set some styles for that label. In your example we will set Label color option to #ff2b2b

Label color option

Label color option

4. Now just hit Publish button and check your shop page. All products with out of stock status must display this label.

New label for out of stock products

New label for out of stock products

In this example we cover how to create a label for Out of Stock products. You can use the same steps to create a label for In Stock, On Backorder and any other custom types of product stock statuses. Just set the needed value for Stock status display condition.