Black Friday 40% off the first year of every plugin. Use code BLACKFRIDAY40

Skip to content

How to Create a WooCommerce Variable Product (Tested on WooCommerce 11.2)

Flat product window with variation options icon beside the title How to Create WooCommerce Variable Products

A WooCommerce variable product is one listing that lets shoppers pick options like size and color, each with its own price and stock. You can build one from the Products screen in a single sitting. It needs no code and no extra plugin.

We built every example here on our WordPress 7.1.3 test store running WooCommerce 11.2 in October 2026, and captured each screen as we went. Recent versions moved several buttons that older guides still show. Generate variations is now a single button, and every variation has its own image gallery.

The five setup steps come first, followed by bulk editing and out of stock behavior. After that we cover the new color swatches and the 30 variation limit with a snippet we ran. The last part shows how shoppers can change a variation already in the cart.

What Is a WooCommerce Variable Product?

A variable product is a single product page that holds several buyable versions of one item. Each version is a variation built from attributes such as Size or Color. Every variation keeps its own price, stock count, SKU, weight and image, while shoppers see one page and one set of choices.

Comparison of a WooCommerce attribute and a variation

The two terms trip people up. An attribute is the type of choice, like Size with the values Small, Medium and Large. A variation is one finished combination, like a Medium hoodie in Black, and only variations can be added to the cart.

Product variations make sense when the options change what the shopper receives or what you pay to stock it. Clothing sizes, paint colors and storage capacity are the classic cases. A downloadable ebook with one file stays a simple product, because there is nothing to choose.

One visible difference shows up on the shop page. A simple product has an Add to cart button in the grid. A variable product shows Select options instead, since the shopper has to pick a combination on the product page first.

How to Create a Variable Product in WooCommerce

To create a WooCommerce variable product, add global attributes under Products > Attributes, set the product type to Variable product and attach those attributes. Then generate the variations, give each one a price, stock and image, and set Default Form Values before you publish the product.

We followed these five steps to build a test hoodie in three sizes and three colors. That gave nine variations, which is a good size for learning because every screen still fits on one page. The same steps work for a product with two options or twenty.

Step 1: Create Global Attributes

Global attributes live in one place and every product can reuse them. That keeps “Medium” spelled the same on every hoodie, and it lets shoppers filter the shop by size later. Custom attributes typed on one product work too, but they cannot be shared or filtered.

  1. Open the attributes screen: Go to Products > Attributes in the WordPress dashboard.
  2. Name the attribute: Type “Size” in the Name field and leave the slug empty so WooCommerce fills it in.
  3. Save it: Click Add attribute. Repeat for “Color” and click Configure terms next to each one.
    Add new attribute form on the WooCommerce Attributes screen
  4. Add the values: On the terms screen, add Small, Medium and Large one at a time with Add new Size.
    Size attribute terms Small Medium and Large in WooCommerce

The terms list has a drag handle on each row, and the “Custom ordering” sort follows that order on the product page. Our first test showed Large before Small because the terms were sorted by name.

Dragging them into Small, Medium and Large fixed it. You can also change the order of WooCommerce product attributes later without touching any orders.

Step 2: Set the Type and Attach the Attributes

A new product starts as a simple product, and the variation tabs stay hidden until you switch the type. This step tells WooCommerce which attributes the shopper will choose from. It also decides which values become variations in the next step.

  1. Start the product: Go to Products > Add new product, enter a title and a description.
  2. Change the type: In the Product data box, pick Variable product from the dropdown.
  3. Attach global attributes: Open the Attributes tab, choose Size from the Add global dropdown and add Color the same way.
  4. Pick the values: Click Select all under each attribute to add every value.
  5. Check the variations box: Keep Used for variations ticked on both and click Save attributes.
    Used for variations checkboxes on a WooCommerce variable product

On WooCommerce 11.2, Used for variations was already ticked when we added an attribute to a variable product. Older guides tell you to tick it by hand, which is still worth a glance. An attribute without that box shows as product information only and never becomes a choice.

Step 3: Generate the Variations

The Variations tab turns the saved attribute values into real, buyable combinations. You can let WooCommerce build every combination or add only the ones you stock. Most stores should generate them all and delete the few they never sell.

  1. Open the Variations tab: It shows “No variations yet” plus two buttons.
  2. Click Generate variations: Confirm the dialog that appears.
    Generate variations button in the WooCommerce Variations tab
  3. Check the list: WooCommerce lists every combination and shows a notice that the new variations have no price yet.
    Nine generated product variations without prices in WooCommerce

The confirm dialog on 11.2 reads “max 50 per run”, and the WooCommerce source sets that cap with WC_MAX_LINKED_VARIATIONS. A product with 72 combinations needs a second click to finish. Use Add manually instead when you sell only certain pairs, such as a color that comes in Large only.

Note: Each manual variation can use “Any Size” or “Any Color” as a value. That single row then matches every size, which is handy when the price never changes by size.

Step 4: Add Prices and Images to Each Variation

A variation without a price is invisible to shoppers. WooCommerce’s own variable product documentation says “Variations without prices don’t show in your store.” So pricing comes before anything else in this step.

  1. Fill every empty price at once: Click Add price on the notice, type the price and click Add prices.
    Set variation prices window in WooCommerce 11.2
  2. Open one variation: Click Edit on a row, such as Medium and Black.
  3. Set its gallery: Click Add variation images, pick the photo for that color and click Update gallery.
  4. Change price and stock where needed: Edit Regular price, tick Manage stock and type a Stock quantity.
    Variation gallery with price and stock fields for a WooCommerce variation
  5. Save: Click Save changes at the bottom of the list.

We set $49 for all nine with Add price. Next we raised the three Large variations to $54 by hand.

The old single image box is gone. WooCommerce 11.1 made the Variation gallery standard, and its release notes say “Variation galleries are now enabled for all stores in WooCommerce 11.1.”

The first image in the gallery becomes the variation’s main image, shown with a Primary badge. When a shopper picks Black, the product photo switches to the black hoodie. That small detail stops the “which color did I order?” emails.

Step 5: Set Default Form Values and Publish

Without a default, the product page opens on “Choose an option” with no single price shown. Default Form Values preselect a variation so the page loads with a price, a stock line and an active button. You can only set them after at least one variation exists.

  1. Pick the defaults: At the top of the Variations tab, choose Medium and Black in the Default Form Values dropdowns.
    Default Form Values set to Medium and Black in WooCommerce
  2. Save and publish: Click Save changes and Publish.
  3. Test it as a shopper: Open the product page in a private window and try each combination.
    WooCommerce variable product page with a default variation selected

Our hoodie opened on Medium and Black at $49.00 with “12 in stock” under the price. Above the dropdowns, a price range from $49.00 to $54.00 covered all nine variations.

This is the screen every shopper sees first. Pick the best seller as the default.

Six steps to build a variable product in WooCommerce 11.2

How to Bulk Edit Variation Prices and Stock

The Bulk actions dropdown in the Variations tab changes one field on every variation at once. It covers prices, sale dates, stock, status, weight and size. Picking an action runs it at once and asks for a value in a small prompt when it needs one.

Bulk actions dropdown in the WooCommerce Variations tab

These are the groups we found in the WooCommerce 11.2 dropdown:

  • Status: Toggle Enabled, Downloadable or Virtual on every variation.
  • Pricing: Set regular or sale prices, raise or lower them by a fixed amount or percentage, or schedule sale dates.
  • Inventory: Toggle Manage stock, set Stock, change the stock status or set a low stock threshold.
  • Shipping: Set length, width, height or weight.
  • Downloadable products: Set a download limit or download expiry.

We used Toggle “Manage stock” and then Stock with the value 12, and all nine variations updated in a few seconds. There is no bulk action for images.

Each color still needs its gallery set by hand. Three colors meant three uploads even with nine variations.

Tip: Bulk actions hit every variation in the product. To change only the Large sizes, edit those rows by hand or filter them in a spreadsheet.

For hundreds of rows it is faster to export WooCommerce products to CSV, edit the file and import it back. Each variation gets its own row in that file, keyed to the parent product. A free product CSV validator checks that every variation row points at a valid parent before you import.

How Out of Stock Variations Behave

A variation with zero stock stays visible on the product page by default. When a shopper picks it, WooCommerce shows “Out of stock” and greys out the Add to cart button. A store setting can hide it instead, but only when stock is tracked per variation and backorders are off.

We set Large and Navy to zero and picked that combination as a shopper. The price changed to $54.00, the stock line read “Out of stock” and the button could not be clicked.

Nothing was hidden. The shopper at least knows the color exists.

Out of stock variation on a WooCommerce product page

Then we turned on the hide option under WooCommerce > Settings > Products > Inventory. With it on, the variable product documentation says “variations that are out of stock will be hidden.”

Our test matched that line exactly. After picking Large, the Color dropdown offered only Black and Heather Gray.

Hide out of stock items from the catalog setting in WooCommerce

Which one you want depends on how fast you restock. Keep sold out variations visible when they come back within days, because shoppers can see the option still exists.

Hide them when a color is gone for good. A variation set to allow backorders stays visible either way, as the same documentation notes. If shoppers want to know when a sold-out variation returns, compare WooCommerce waitlist plugins.

By default, every attribute shows as a plain dropdown on the product page. WooCommerce 11.2 adds an experimental core option called Color swatches for attributes that turns colors into round swatches and sizes into buttons. It works only with a block theme and the Add to Cart with Options block.

We switched it on to see what it needs. These are the four changes it took on our Twenty Twenty-Five store:

  1. Turn on the feature: Go to WooCommerce > Settings > Advanced > Features and tick Color swatches for attributes under Experimental features.
    Color swatches for attributes experimental feature in WooCommerce 11.2
  2. Change the attribute type: Edit Color under Products > Attributes and set Type to Color / image.
  3. Give each term a color: Edit Black, Navy and Heather Gray, keep Swatch type on Color and pick the Color value.
  4. Swap the block: In the Single Product template, replace the Add to Cart form block with the Add to Cart with Options block.

Step four is the one most people miss. The default single product template still uses the older Add to Cart form, which ignores swatches.

It is a template edit in the Site Editor. Read how to customize the WooCommerce product page first if that editor is new to you.

WooCommerce color swatches on a variable product page

The result looked clean, and the out of stock Navy swatch faded out when we picked Large. Keep in mind the label on that screen: experimental features can change between releases. On a busy store, a swatches plugin is still the safer choice until this one leaves the experimental list.

The 30 Variation Limit and How to Raise It Safely

WooCommerce loads variation data with the product page only when a product has 30 variations or fewer. Above 30, the classic dropdowns list every value and check each pick with a request to the server. The woocommerce_ajax_variation_threshold filter raises that limit, at the cost of a heavier page.

The official snippet page says “if there are more than 30 variations, the drop-downs will be static.” Its threshold documentation shows the filter.

We wanted to see what that means for a shopper, which is why we built a second product to test it.

Our Training Hoodie has four sizes, four shades and two fits, which is 32 combinations. We deleted one that we do not stock (XL, Red and Slim), leaving 31 variations. That is one over the limit, which is the worst case to test.

On the classic product form, picking XL and then Red still offered Slim in the Fit dropdown. Choosing it returned the message “Sorry, no products matched your selection.”

The shopper only learns the combination is missing after making all three choices.

No products matched message above the 30 variation limit in WooCommerce

This is the snippet we ran on the test store. It raises the limit to 60 and never lowers a value that another plugin already raised:

add_filter( 'woocommerce_ajax_variation_threshold', 'dd_raise_variation_threshold', 10, 2 );

function dd_raise_variation_threshold( $threshold, $product ) {
	return max( (int) $threshold, 60 );
}

Put it in a WordPress child theme functions.php file or a code snippets plugin, never in the parent theme. Parent theme files are replaced on every theme update.

The snippet reads no user input and writes nothing. There is nothing to escape or sanitize.

With the filter active, picking XL and Red left only Regular in the Fit dropdown, and Slim was not offered at all.

The cost showed up in the page size. The product page HTML grew from 150 KB to 232 KB, because all 31 variations now ship inside the page.

What changes above the 30 variation limit in WooCommerce

So raise the number only as far as your largest product needs. If a product needs 200 variations, splitting it into two products usually beats shipping all that data to every visitor. Our guide on how many products WooCommerce can handle covers the wider performance side.

Worth knowing: The block based Add to Cart with Options form behaved differently. With the snippet removed, it still disabled Slim for XL and Red on our 31 variation product. That block loads every variation with the page anyway.

What Happened to the New Product Editor?

The block based product editor that WooCommerce tested as a beta is gone. It was removed from core in WooCommerce 11.0, and every variable product is edited in the classic screen shown above. Existing products and variations were not changed.

The WooCommerce developer blog announced the change in June 2026. Its product editor retirement post says the beta would be “removed from WooCommerce core in WooCommerce 11.0.” The same post states “Stores will continue to use the classic product editor.”

We checked the Features screen on 11.2 and found no product editor option left to switch on. If an older tutorial shows a variations screen with blocks and a sidebar, that screen no longer exists.

How Shoppers Can Change a Variation in the Cart

Core WooCommerce has no way to change a variation once it sits in the cart. A shopper who picked Medium instead of Large has to delete the line, go back to the product and add it again. A cart switcher plugin adds a Change options button that swaps the variation in place.

Default WooCommerce cart line with no way to change the variation

We build the WooCommerce Cart Variation Switcher, which is why it is the plugin shown here. It works on the classic cart, the Cart and Checkout blocks and the checkout page. It also covers the classic mini cart that most themes show in the header.

As of October 2026 it costs $19 a year for one site and up to $119 a year for ten sites. Every switch is checked against stock on the server before the cart line changes.

  1. Turn it on: Go to DevDiggers Plugins > Cart Variation Switcher > Configuration > General, tick Enable Cart Variation Switcher and keep Cart page under Show Switcher On.
  2. Add a variable product to the cart: The Change options button appears under each variable item.
    Change options button under a cart item from Cart Variation Switcher
  3. Pick the new option: The popup shows the new image, price, stock and the price difference, such as “+$5.00” for the blue hoodie.
    Cart Variation Switcher popup with a new color picked
  4. Update the item: Click Update item. The line keeps its place and quantity, and the cart totals update.
    Cart line switched to a new variation with the updated price

We ran this on our demo store in October 2026. A Black size L hoodie at $35.00 became a Blue size L hoodie at $40.00 without leaving the cart, and the subtotal moved to match.

One honest limit: the switcher swaps options of the same product only. It cannot turn a hoodie into a T-shirt.

Its inline layout also works only on the classic cart page, while blocks always use the popup. Compare other update variations in cart plugins if you need either of those.

Common Variable Product Mistakes and Fixes

Four setup slips cause most variable product support threads. Options do not appear because an attribute was saved without Used for variations, or variations exist without a price. A wrong price range, a gallery that never changes and a false “Out of stock” message cover the rest.

Four variable product setup mistakes and their fixes

Here is what to check for each, in the order we would check them:

  • Options missing: Tick Used for variations in the Attributes tab and save. Generate the variations again.
  • Variation hidden: Look for the notice about variations without prices and use Add price to fill them.
  • Wrong price range: Sort the Variations list for a forgotten $0 or a typo, since the range uses the lowest and highest prices.
  • Gallery will not switch: Give each variation its own Variation gallery image instead of using only the main product gallery.
  • Shows out of stock: Tick Manage stock on each variation and enter its quantity on that variation. The parent product quantity does not count.

Variable Products and Search Results

Search engines see a variable product as one page with a price range, because every variation shares the parent URL. On our 11.2 store, WooCommerce marked the hoodie up as a Product with an AggregateOffer from $49.00 to $54.00. Its offer count of 9 matched the nine variations.

Its product variant structured data guide exists “To help Google better understand which products are variations of the same parent product.” WooCommerce 11.2 did not output that format on our test product.

An SEO plugin or custom code would have to add the ProductGroup markup if you want it.

Write one strong description that names the sizes and colors once. Repeating every combination adds nothing. If you list products in Google Shopping, each variation needs its own GTIN in your Google Shopping feed for WooCommerce.

Conclusion

A WooCommerce variable product comes down to three things done in order. Save attributes with Used for variations ticked, give every variation a price, and set Default Form Values so the page opens on a real choice. Everything else on WooCommerce 11.2 builds on those three.

Use Bulk actions for prices and stock, and the Variation gallery for images. Decide on purpose whether sold out variations stay visible. Keep an eye on the 30 variation limit, and raise it only as far as your biggest product needs.

If shoppers often change their mind after adding an item, a cart switcher saves them the delete and add again dance. Test every combination as a shopper before you call a product done.

Frequently Asked Questions (FAQs)

Q1. How many variations can a WooCommerce product have?

WooCommerce sets no hard maximum on variations per product. Generate variations creates up to 50 per click, and larger products need more than one run. Past 30 variations the classic product page switches to static dropdowns unless you raise the threshold.

Q2. Can I change a simple product into a variable product?

Open the product, change the Product data type from Simple product to Variable product and add your attributes. The title, description and main images stay. The old single price no longer applies, and every variation needs its own price.

Q3. Why does the shop page show Select options instead of Add to cart?

A variable product cannot be added to the cart until a shopper picks a combination. WooCommerce therefore shows Select options in the shop grid and sends the shopper to the product page. Simple products keep the Add to cart button.

Q4. Can each variation have its own weight and shipping class?

Yes. Every variation has its own Weight, Dimensions and Shipping class fields, and the shipping class defaults to Same as parent. Leave Virtual unticked on that variation, or the shipping fields disappear.

Q5. Do price changes affect orders that were already placed?

WooCommerce stores the price inside each order when the customer buys. Changing a variation price later only affects new orders. Past invoices and refunds keep their original amounts.

Q6. Can I import variable products from a CSV file?

Yes. The built in importer under Products > All Products > Import reads a parent row plus one row per variation. Export one finished product first and copy its layout, because the column names must match exactly.

Q7. Does the WooCommerce REST API handle variations?

Yes. The WooCommerce REST API treats variations as a sub resource of each product, with their own price, stock and attributes. Inventory tools and headless stores use it to sync variations without opening the admin.

Rishi Yadav
Rishi Yadav

Rishi Yadav is a content writer at DevDiggers who covers WooCommerce store management, WordPress performance and security. He works through each topic in a test environment before writing about it. His guides focus on the steps and settings that matter and skip the ones that sound good on paper.

Leave a Reply

Your email address will not be published. Required fields are marked *