How to Create a Variable Product in Woocommerce

If you’re selling products in Woocommerce, chances are you’ll want to give your customers options from which they can choose at some point. Imagine you’re selling blue jeans, for example. You may want your customer to choose between sizes, colors and whether or not they come with a bunch of rips in them or not.

These are called variations in Woocommerce. Variations are created using what’s called attributes. Here’s the best way to go about it.

Create Your Attributes in Woocommerce

partial screenshot of where to find the Attributes tab in Woocommerce
Start by navigating to Products > Attributes.

On that page, you’ll see something like this:

partial screenshot of the form to create new attributes in Woocommerce
This is where we create our attributes.

You may recognize this form, it’s very similar to that which you’d use to create a tag or category in WordPress.

The big difference here is that Attributes are grouped a bit differently. In this form, all you really need to do is add a name. In the screenshot above we’re using Size, but you might use Color, Quantity, Width, whatever aspect of your product you need your users to choose from. Once you add your name, click Add Attribute.

Next, you’ll want to click Configure Terms to the bottom right of your newly created attribute.

partial screenshot of the Woocommerce attributes page
Click Configure terms.

You’ll see a similar form again. This is where you’ll enter in the options in your group. So since I chose Size, I would add sizes like Small, Medium, Large or 32, 34, 36, etc. Whatever is relevant to your particular products.

screenshot of the form to add new terms to your attriibute
Add terms one at a time via this form.

When you’re finished, you’ll end up with a table like this:

partial screenshot of the list of attribute terms
Our terms, listed.

That’s it, you’re done!

It’s also worth noting that this step is optional. If you have products that don’t tend to share these types of “attributes”, you can skip this part of the process altogether, as these attribute terms can be created directly in a product as well, which we’ll cover in a moment.

If you sell blue jeans, chances are they’ll all have similar attributes like waist size, length and color. If you sell items that don’t share attributes like this, you may not be as concerned with keeping them all grouped in this area. It’s also worth noting that you don’t need to assign all attributes to all products. For example, if one brand of jeans you’re selling only comes in the color blue, but you have created red, white, stonewashed, black and blue color attribute terms, Woocommerce allows you to set which and how many attributes, and similarly which and how many attribute terms, any given product can have.

Create Your Product Variations

Next up, lets go in and edit a product. You’re looking for this table:

Woocommerce product data meta box
Woocommerce Product Data meta box.

First, choose Variable product from the dropdown at the top:

various options in a woocommerce product
Product type selection.

This gives us additional options in the tabs on the left side of this area:

partial screenshot of woocommerce product data meta box
We want to start with the Attributes tab.

On the attributes tab, we can choose our predefined attributes from the dropdown, or Custom product attribute to create terms specific to this product.

screenshot of how to choose a predefined attribute in woocommerce
Choose one of your previously created attributes if you’d like.

…or…

screenshot of how to choose the option to create a custom product attribute
Create a new attribute set specific just to this product.

If you’re using previously defined attribute terms, you’ll get an interface like this:

screenshot of how to select attribute terms
If you click in the large box, you’ll begin to see all of the options. You can also type a few letters to narrow down your selection / search the existing terms.

If you just want to create terms for this product:

screenshot of adding custom attribute terms
Enter a name for the attribute group in the smaller box on the left. Then add your terms, such as small, medium and large, in the box to the right. Separate each term with the “pipe” character, i.e. this: |

In either case, make sure you check “Used for variations”.

checkboxes available on this step
You must check “Used for variations”

Click Save Attributes.

Next, hop into the Variations tab:

screenshot showing how to create variations from all attributes
Use the dropdown menu to “Create variations from all attributes.”

By using this “Create variations from all attributes” dropdown, Woocommerce will make one product variation, i.e. set of options, for each product. So if you just have one set of variations, like Size, and you used small, medium and large, you’ll get 3 sets of options to edit.

If you had two or more sets of attributes, let’s say two (Size and Length) for our purposes here, and you entered in three lengths as well as three sizes, you’ll end up with 3 x 3 = 9 sets of options. Because this number can quickly get out of hand if you have a lot of attribute terms, Woocommerce warns you of this:

screenshot of browser alert that you're about to create variations
Just click OK.

You’ll get a table like this:

screenshot of our new variations displayed in a table
Our list of option groups is now displayed.
screenshot showing options on hover
Hover over one of the options and click on the down arrow to expand it.

Each group of options has the following.

screenshot of the options for any given variation
Here’s where we set our variation options.

The only required field is Price. Without it, this particular variation won’t show.

Fill in as many of the additional fields as you require. For example, some shipping plugins need you to enter in the dimensions and weight. You can choose to enter in a Stock Quantity by first checking Manage stock?, and so on.

Then click Save Changes at the bottom of this tab and you’re all set!

Up Next: How to Take Your Store International