Product Variations

Variable products are a great feature of WooCommerce for offering variations of a product with different prices, stock and more. They can be used for offering variations of a product e.g. a large t-shirt vs a small t-shirt. Each variation can have different properties and prices.

Adding attributes for variations ↑ Back to Top

Set the product type

To add a variable product, select the type ‘variable’ from the product type dropdown. The interface will change to reflect your selection.

Choose the variation product type

Choose the variation type

Define variation attributes

On the attributes tab, add attributes to your product – you can use global attributes (see Managing Product Categories, Tags and Attributes) or define custom ones specific to your product.

Add your attribute to the product

Add your attribute to the product

Make sure to assign all values of the attribute to the variable product, which will become options, and select the ‘variation’ checkbox on each attribute to tell WooCommerce it’s for your variations:

Add attributes and ensure the variations checkbox is checked

Add attributes and ensure the variations checkbox is checked

At this point you need to save your product

Add variations ↑ Back to Top

After saving your product, you can now begin adding variations or link all possible variations. To add a variation, click the ‘add variation’ button. A new blank row will appear, ready for you to input data.

A new variation

A new variation

Each variation of a product may be assigned the following data:

  • An image – click the icon to see the image uploader. After you choose an image click ‘insert into post’.
  • SKU – Set the SKU for the variation, or leave blank to use the variable products SKU.
  • Stock quantity - Stock for the particular variation, or left blank to use the variable product’s stock settings.
  • Weight - The weight for the variation, or left blank to use the variable product’s weight.
  • Dimensions – The dimensions for the variation, or left blank to use the variable product’s dimensions.
  • Price - The variations price. Required.
  • Sale price - The variations sale price.
  • Downloadable - If this variation is a downloadable product, check the box. You can then input file URL and download limits.
  • Virtual - If the variation is virtual, check the box.
  • Enabled – Uncheck the box to disable the variation. It will no longer be available.
  • Shipping class – Shipping class can affect shipping. Set this if it differs from the variable product.
  • Tax class – A tax class for this variation. Useful if you are offering variations spanning different tax bands.

If the sku, weight, dimension and stock fields are not set, then it simply inherits the values assigned to the variable product. Price fields must be set per product.

Bulk editing ↑ Back to Top

Above the variations you have access to some bulk editing tools to speed up data input:


Linking possible variations ↑ Back to Top

Instead of adding a variation one at a time, you can click the ‘link all variations’ button. This will create a new variation for each and every possible combination of variation attributes (max 50 per run).

If your example had 2 attributes – colour (with values blue and green) and size (with values large and small), it will create the following variations:

  • Large Blue
  • Large Green
  • Small Blue
  • Small Green

Setting default variations ↑ Back to Top

On the front end, variations need to be selected before an add to cart button is displayed. However, if you define a default variation to use, then it will be displayed immediately:

The result: Frontend ↑ Back to Top

On the frontend, when viewing a variable product, the user will be presented with dropdown boxes to select the variation options; selecting options will reveal the stock, price and add to cart button for the variation so the user can purchase the product.

Variations on the front-end

Back to the top