How To Manage Stock of a Variable Product in WordPress’ WooCommerce e-Commerce Plugin

software: WordPress
plugin: WooCommerce

Holy that title was a handful to write, but I think it says exactly what we’re going to do here today. This article will make the assumption that you have WordPress installed as well as the plugin WooCommerce.

Add New Product | WooCommerce

To start, you must create a new product. On your Dashboard, left hand menu -> Products -> Add New Product

Woocommerce - add new product
Woocommerce – add new product

I will also now assume you know how to edit the Product Description for this product. However, we’re going to now browse to the Product Data, and let WooCommerce know this is a Variable Product, which means that when users are checking out the product, they have a few options to select between.

Woocommerce - Variable product
Woocommerce – Variable product

Defining Product Attributes | WooCommerce

Once you describe this product as a Variable Product, we now need to let WooCommerce know what the variations are! These are known as Product Attributes

WooCommerce - Global Attributes
WooCommerce – Global Attributes

I will show you how to do in product definitions of the Attributes, but there is also a broader global attribute definition that is very handy when you have multiple products that will have the same variables (think t-shirt sizes S-M-L-XL for example).

When you click on Add New Custom Product Attribute, it will first ask you for a name, and then ask you to define the attributes. This is fairly straight forward, done much like you would add tags to a Post.

WooCommerce - Attributes
WooCommerce – Attributes

Please note that selected on this page is “Used for variations” and not selected “Visible on the product page”. I know, it’s hard not to want to have that second one selected.

Define the Product Variations | WooCommerce

Once you have saved attributes, now select Variations from the left menu and select Add Variation. This will pop up a new variation that will have a drop down list of the values you defined in the Attributes section.

WooCommerce - Add variation
WooCommerce – Add variation

Managing Stock of a Custom Attribute Variation | WooCommerce

As you can see in the image above, I’ve created the variation of Medium and Large. There are two ways to manage stock of items, one is on the product level and the other is on the variation level. If you expand the variation you’re looking to manage stock on (I’ll do Large for this example) you will see an option to select Manage Stock, and then a value bar open up where you can say how many you have in stock.

WooCommerce - Manage Stock on Custom Variation Attribute
WooCommerce – Manage Stock on Custom Variation Attribut

Manage Simple Product Stock in WooCommerce

To manage stock of a product that’s not variable, it’s done on the product inventory tab.

WooCommerce - Enable stock management at product level
WooCommerce – Enable stock management at product level

Hope this helps!


  1. JH June 3, 2020 12:33 pm  Reply

    No, this doesn’t help at all, and it’s just asking for a mess. For instance, let’s pretend that one of your variables is also a separate product. You have PRODUCT A which can be purchased from it’s own product page and inventory is tracked there.

    Now you want a variable product that includes PRODUCT A as a variable. You’re in a pickle now, because you can’t tie the inventory of “variation product A” to the original “product a” so they track together. What a mess.

    • Ned June 3, 2020 5:49 pm  Reply

      That is an interesting scenario you paint JH. Thanks for your thoughts.

      In can see what you’re saying being a problem with nomenclature, were you trying to analyze the sales and your report was flattened – no product with variations, just variation names.

      However, what you’re suggesting is to make two product that exist for one single product, which I’d say is indeed going to make your website a mess. I do not recommend doing what you suggest as a scenario and cannot figure out any reason or scenario why that would make sense to do it. Either it’s a variable of a product, or it is its own product.

      If you have a t-shirt with a flame on it, and a t-shirt with a tiger on it, it’s not good practice in my mind to create a product ‘t-shirt’, with the variables of tiger or flame. What I feel is standard practice is to create a category of t-shirts (so they could be all searched) with two products, tiger t-shirt and flame t-shirt, and each could have a common variables of sm, med, and large.

      In this scenario, one would never decide to create a product called Large and have that selling on its own. And it would also would not make sense to have a tiger t-shirt with the option to select a variation of a flame. It would be smarter to use similar products in this case.

      This probably doesn’t help you since you most likely have created a nice monster of a site that’s organized in your mind, but hopefully it gives the reader some clarity on how I would go about setting up an e-commerce site.

Leave a Reply

13 − 8 =