A variation nobody can select
An earlier variation set to “Any size” answers every choice this one would. WooCommerce never serves it, so its price and stock never apply.
The symptom
The product page looks right. The dropdowns offer every size, and the price range reads $10–$99. A customer picks size S, which you priced at $99, and pays $10.
Another variation of the same product has its size set to Any Size…. WooCommerce allows that, and it is useful when one price covers every size. But when a customer makes a choice, WooCommerce takes the first variation that fits it, in the order of the Variations tab. A variation set to “Any size” fits every size. If it comes first, the variation for size S is never picked, and its price, stock and SKU never apply.
The same happens with two variations that have exactly the same attribute values, which is what a duplicated row in an import looks like. The second one can never be picked.
What it costs
- Customers can pay the wrong price. In our test on WooCommerce 10, a customer who picked size S paid the price of the “Any size” variation listed above it.
- Stock goes wrong. Orders reduce the stock of the variation that took the choice. The stock of the hidden one never moves, so it says you have goods that never sell.
- Reports hide it. Sales reports show only the variation that actually sold. The other one has no sales, and nothing points to why.
- The price range misleads. The category page shows both prices, as if both applied.
How to check it yourself
Open the product and go to Product data → Variations. Read the variations from the top. A variation is unreachable when one above it has, for every attribute, either Any … or the same value. Two variations with identical values count too.
To find the products worth opening, list the variations set to “Any” for some attribute:
wp db query "SELECT p.post_parent AS product, p.ID AS variation, p.menu_order, m.meta_key \
FROM wp_posts p JOIN wp_postmeta m ON m.post_id = p.ID \
WHERE p.post_type = 'product_variation' AND p.post_status = 'publish' \
AND m.meta_key LIKE 'attribute_%' AND m.meta_value = '' \
ORDER BY p.post_parent, p.menu_order, p.ID"
Replace wp_ with your table prefix. An “Any” variation on its own is fine. It is a problem only when
another variation of the same product, lower in the list, covers some of the same choices. A
variation saved with no attributes at all behaves like “Any” too, but it has no rows to show here.
WooCommerce does not warn you when you save such a product.
How to fix it
- Give the “Any” variation real values, or delete it if the specific variations now cover every option.
- If two variations are identical, delete one. First check which of them holds the stock you actually have.
- Keep “Any” only where no other variation covers the same combination. One “Any size” variation per color is fine. “Any size” next to “Size S” in the same color is not.
- Dragging the specific variation above the “Any” one in the Variations tab also works, but the next reorder can undo it.
When it’s a false alarm
- A spare variation you keep on purpose. Its price and stock still never apply, so deleting it is usually better than keeping it.
How Merchlint finds it
Merchlint reads the attributes of every variation of every published variable product, in the order WooCommerce uses to match a choice: the order in the Variations tab, then the variation ID. A variation is reported when an earlier one matches every choice it would answer: on each attribute, the earlier one is set to “Any” or has the same value. A variation with no attributes saved counts as “Any”.
There is one finding per product, because the fix happens on one screen. It shows how many variations the product has, how many can never be picked, and one example pair: the variation that takes the choice and the one it hides. On a product with thousands of variations, Merchlint stops comparing at a set limit and says the count is incomplete.
Confidence: F—fact from the database. An earlier variation covers this one, or it does not.
This check is part of the Pro add-on, which is still being prepared. The free plugin does not run it.
Install freeDoesn't match what you see in your store? Email us—we read every message. contact@merchlint.com