WooCommerce Engineering 1–2 min read

How to set up WooCommerce variable products and fix a disabled Add to cart button

Set a price and stock policy for each size or colour. Test a missing combination, a sold-out option and the price that reaches checkout.

READ THE ARTICLE

A blue shirt in medium and a blue shirt in large share a photograph. They may have different stock, prices or supplier codes. In WooCommerce, the parent groups those choices for the shopper. A variation represents the particular combination they can buy.

Start with two real combinations

In the product editor select the variable product type. Add the attributes that buyers must choose, such as size and colour. Reuse a global attribute if the catalogue already uses the same sizes across products. Mark the attribute for variations and save it. Under Variations, create the combinations you sell. Generating every possible combination is convenient only if all of them exist.

Open each variation and enter a regular price. Add its SKU if you track it independently. Decide whether it has its own quantity or shares the parent’s stock. For a limited print run available in several finishes, a shared quantity can make sense. For boxed shirts on separate shelves, individual size quantities are usually the useful measure.

When Add to cart stays grey

Select every required attribute in a fresh customer session. Check that this exact combination exists, is enabled, has a price, and is available under the store’s stock and backorder rules. A price displayed on the product page can describe another available variation. It does not establish that the selected one is purchasable.

If every selection works on a staging copy with the standard product template, investigate the live theme or swatch extension. Record the failing combination and compare one component at a time. A blanket change to stock settings can hide the underlying display problem.

An acceptance test for a catalogue change

Try one available size, one sold-out size and one combination you never sell. For the available size, follow the selection into the basket and confirm its SKU, displayed price and quantity. For the other two, make sure the customer can tell what happened. See the WooCommerce product reference and the inventory checklist.

HANDS-ON HELP

Running into this on WooCommerce?

Explore support for store workflows, integrations and custom development.

WooCommerce Engineering

Need WooCommerce help beyond this fix?

Explore support for store workflows, integrations and custom development.

WooCommerce Engineering
Add maksut.net as a preferred source on GoogleMy new articles can show up more often for you in Google’s Top Stories and AI Overviews.(opens in a new tab)

Send a note

Have a correction, suggestion or a different interpretation? Send me a note.

SEND A NOTE