Product variations in WooCommerce let you sell one product in several combinations, such as different sizes, colors, or any attribute you define. Each variation can have its own price, stock, and image. This guide walks through the whole process: creating attributes, building a variable product, and setting the options for each variation.
I retook every screenshot on a clean WooCommerce 11.3 store, so the screens match what you see today.
If you’re new to WooCommerce, start with our guide on how to create an online store with WooCommerce.
Creating New Product Attributes
Before creating a product with variations, you’ll need to create its attributes first. In the WordPress dashboard, go to Products > Attributes, create two new attributes, and name them. For this example, I’ll use the attributes “Color” and “Size”.
You can also create an attribute that belongs to one product only, straight from the product edit page. More on that in the FAQ below.
Once you’ve created the attributes, click Configure terms next to each one to add its terms. For example, under Color, create terms such as “Red,” “Green,” and “Blue.” Under Size, you might add “Large,” “Medium,” and “Small.” Here’s the terms screen for Color:
The key thing to remember is that a combination of terms from your attributes, such as “Green” and “Medium,” creates a variation.
Creating a Product with Variations
Next, create the product. In the WordPress dashboard, go to Products and click Add New. In the Product data box, select Variable product from the dropdown. You’ll still need to add the usual product details, of course, but this guide focuses on adding product variations.
Assigning Attributes to the Product
Open the Attributes tab and choose an attribute from the Add global dropdown. Repeat this for each attribute, then select the values (terms) available for this product:
Important Points to Remember
- Make sure Used for variations is checked, otherwise the attribute won’t appear in the Variations tab. Visible on the product page controls whether it appears in the product’s Additional information tab.
- Select only the terms that apply to the product. For example, if a product is available only in Medium, add just that term. Click Save attributes when you’re done.
- Click Select all to add every term for that attribute, or Select none to clear them all.
- Click Create value to add a new term without leaving the product page.
Setting Specific Variations for the Product
Now define the specific variations for the product. A variation is a single combination of terms, such as Green + Medium. Open the Variations tab on the product page:
Additional Tips
- Generate variations creates every possible combination in one click. Three colors and three sizes give you nine variations, as shown in the screenshot. Use Add manually when you want to add just one combination instead.
- Under Default Form Values, choose the combination that is pre-selected when a customer opens the product page.
- The Bulk actions dropdown lets you set prices, stock, and other fields for all variations at once. It can save a lot of time on larger products.
- For products with up to 30 variations, WooCommerce embeds all variation data in the page, so the dropdowns hide combinations that don’t exist. Above 30, it loads each variation by AJAX after the customer makes a choice, and the dropdowns list every option. Keep that in mind when planning products with lots of combinations.
Setting Variation Options for a Specific Product
You can edit details for each variation, including price, stock status, and SKU, by clicking Edit next to the variation in the Variations tab.
Here are the settings for the Green + Medium variation from the example:
Most settings here are self-explanatory, and some fields may auto-fill based on earlier choices. You can set a regular and sale price, stock, weight and dimensions, and mark the variation as downloadable or virtual.
Three newer fields are worth knowing about:
- GTIN, UPC, EAN, or ISBN (since WooCommerce 9.2) – the product identifier that Google Shopping and other channels ask for.
- Variation gallery (since WooCommerce 11.1) – each variation can have several images, rather than just one. The first image is the primary.
- Customs (since WooCommerce 11.3) – commodity code, country of origin and a customs description, for stores that ship abroad.
Save your changes, publish the product, and that’s it. Here’s how the variation from the example looks on the product page, with its own price, sale and stock:
If you need to add extra data beyond the built-in fields, see our guide on adding custom fields to WooCommerce products.
Displaying Variations as Swatches
By default, WooCommerce uses a dropdown for variation selectors. If you’d rather show color swatches, image buttons, or size boxes, the Variation Swatches for WooCommerce plugin is a popular option, with more than 300,000 active installs on WordPress.org.
For more variation-related tools, the WooCommerce extensions store offers options for bulk pricing, conditional variations, and more.
FAQs
Common questions about WooCommerce product variations:
woocommerce_ajax_variation_threshold filter.Summary
Variable products are one of WooCommerce’s most flexible features. Once you understand how attributes, terms, and variations fit together, the process is pretty straightforward. The FAQ above covers the most common issues with stock tracking, pricing, and frontend display. Feel free to leave a comment if you have questions.







