search

Adding Product Variations in WooCommerce – Step by Step

Product variations in WooCommerce let you sell a single product in multiple combinations – different sizes, colors, or any attribute you define – each with its own price, stock, and image. This guide covers the full process: creating attributes, building a variable product, and setting each variation’s options.

If you’re new to WooCommerce, start with our guide on how to create an online store with WooCommerce first.

Creating New Product Attributes

Before you create a product with variations, you first need to create attributes. In the WordPress dashboard, go to Products > Attributes, create two new attributes, and give them names. In this example, we’ll create the attributes “Color” and “Size”.

Adding Attributes to a Variable Product - WooCommerce

Adding Attributes to a Variable Product – WooCommerce

Note that you can also add new attributes on the single product edit page itself…

After creating the attributes, click Configure Terms next to each attribute to create terms for those attributes. For example, under Color, create terms like “Green,” “Yellow,” and “Brown,” and under Size, create terms like “Large,” “Medium,” and “Small.” Here’s how it will look (in my case I used numbers to represent the size):

Adding Terms to Attributes - WooCommerce

Adding Terms to Attributes – WooCommerce

It’s important to understand that the combination of any attribute (like “Color”) with a specific term (like “Green”) forms a variation.

Creating a Product with Variations

Now let’s create the product. Under Products in the WordPress dashboard, click Add New. In the Product Data section, select Variable Product. Of course, you’ll need to add all relevant details about your product, but for this guide, I’ll focus on the steps for adding product variations.

Variable Product - WooCommerce

Variable Product – WooCommerce

Assigning Attributes to the Product

Under the Attributes tab, select the attribute(s) you want to assign to the product and click Add.

Adding Attributes to Products - WooCommerce

Adding Attributes to Products – WooCommerce

Now, choose the terms you want for the product:

Choose Terms for Product - WooCommerce

Choose Terms for Product – WooCommerce

Important Points to Remember

  1. Ensure both Visible on the product page and Used for variations are checked.
  2. Select the terms relevant to the product. For instance, if a product is only available in Medium size, add only that term for the product. Click Save Attributes when done.
  3. You can click Select All to add all terms assigned to a specific attribute for the product.
  4. You can add additional terms (not created previously) to the product by clicking the Add New button.

Setting Specific Variations for the Product

Now let’s define the specific variations for this product. Remember, a variation is a combination of an attribute and a specific term for a product. Go to the Variations tab in the product page:

Adding Product Variations - WooCommerce

Adding Product Variations – WooCommerce

Additional Tips

  • Under the Default Form Values field, you can choose a default attribute that will appear on the product page when viewed by the customer.
  • Bulk editing speeds up the process when you have many variations. Use the dropdown to apply actions to all variations at once. The Add variations from all attributes option automatically creates every possible combination – the fastest way to get started.
  • WooCommerce loads variation data dynamically for products with fewer than 30 variations. Above that threshold, all dropdowns become static – every option appears at once regardless of availability. If you have a product with many combinations, keep this behavior in mind when planning your attribute structure.

Setting Variation Options for a Specific Product

You can edit details for each variation, such as price, stock status, and SKU, by clicking the Edit button next to the variation in the Variations tab.

The following image shows the settings for a single variation. In this window, you’ll find all settings you can add to this specific variation. In the image below, these are the settings for a product attribute of “Color” with the term “Yellow” for a specific watch:

This window opens when you click the small triangle (highlighted in the image) next to the variation you added.

Setting Product Variation Details - WooCommerce

Setting Product Variation Details – WooCommerce

The settings here are mostly self-explanatory, and some fields may auto-fill based on previous choices. You can set a price, sale price, product type (downloadable or virtual), and dimensions.

Since WooCommerce 9.2, each variation also has a Global Unique ID field for GTIN, UPC, EAN, or ISBN – useful if you sell on Google Shopping or other channels that require product identifiers.

Save changes, publish the product and you’re done. If you need to add extra data beyond the built-in fields, check out our guide on adding custom fields to WooCommerce products.

Displaying Variations as Swatches

The default WooCommerce variation selector uses a dropdown. If you want to show color swatches, image buttons, or size boxes instead, the Variation Swatches for WooCommerce plugin is the most widely used option – over 9 million installs, actively maintained, and compatible with current WooCommerce versions.

For more variation-related tools, the WooCommerce extensions store has options for bulk pricing, conditional variations, and more.

FAQs

Common questions about WooCommerce product variations:

How many variations can a single WooCommerce product have?
There is no hard limit, but performance degrades significantly above 50-100 variations. Each variation is stored as a separate database row, and all variation data is embedded in the page HTML - a product with 100 variations can add 500ms or more of server processing time. Keep your variation count manageable for better performance.
Can each variation have a different price?
Yes. Every variation has its own regular price and optional sale price. You can set these individually per variation, or use the bulk edit dropdown in the Variations tab to apply a price to all variations at once.
Can I track stock separately for each variation?
Yes. In each variation's settings, enable Manage stock? and enter a stock quantity. WooCommerce will track inventory per variation independently, and each out-of-stock variation can show as unavailable without affecting the rest.
How do I set a default variation on the product page?
In the Variations tab, use the Default Form Values field to select the attribute terms that should be pre-selected when a customer lands on the product page. This won't prevent customers from choosing other options - it just sets the initial state.
Why are my variation dropdowns not filtering dynamically?
WooCommerce only loads variation data dynamically (via AJAX) when a product has fewer than 30 variations. Above 30, all dropdowns become static and show every option regardless of availability. This is a built-in performance threshold controlled by the woocommerce_ajax_variation_threshold filter.
Can I add a custom attribute that doesn't exist globally?
Yes. On the product edit page, under the Attributes tab, select Custom product attribute from the dropdown instead of a global attribute. Custom attributes are local to that product and won't appear in the global attributes list under Products > Attributes.

Summary

Variable products are one of WooCommerce’s most flexible features. Once you understand the relationship between attributes, terms, and variations, the process becomes straightforward. The FAQ above covers the most common issues with stock tracking, pricing, and frontend display. Feel free to leave a comment with questions.

Comments are closed
Savvy WordPress Development official logo