WooCommerce import error: "A new variation cannot be created because "%1$s" is not an option of the parent product's "%2$s" attribute."

What it means: This is a message template in WooCommerce's import code: %1$s is the value from your variation row, such as "XL", and %2$s is the attribute name, such as "Size". Since WooCommerce 11.1 it appears when "Update existing products" is ticked and a variation row has a SKU that is not in your store yet. The parent has the attribute, but not that value, and a shopper could never pick it, so WooCommerce skips the row. On a normal import of new products there is no message, and the variation may not be selectable in your store.

Find the rows in your file

WooCommerce product import

The product CSV you are about to import into WooCommerce (Products, Import), or the one that just failed.

Your file stays on this device

It is read and converted by this page, inside your browser. Nothing from the file is uploaded, and the tool keeps working offline once the page has loaded.

No file handy? or download the sample to look at it first.

The products in the sample are invented. It is checked on this device, the same way your own file would be.

Loading the converter...

How to fix it

  1. Add the value to the parent's list, for example Attribute 1 value(s) "S, M, XL" on the parent row.
  2. Or change the variation's value to one the parent already has.
  3. For a custom attribute (Attribute 1 global is 0) WooCommerce compares the text exactly, so "xl" and "XL" are different. Copy the value from the parent row.
  4. Import the file again.

Example

A file with this problem

Type,SKU,Name,Published,Visibility in catalog,Tax status,In stock?,Stock,Regular price,Images,Parent,Attribute 1 name,Attribute 1 value(s...
variable,TEE,Tee,1,visible,taxable,1,,,,,Size,"S, M",0
variation,TEE-XL,Tee XL,1,visible,taxable,1,3,20.00,,TEE,Size,XL,0

What the checker says about it

  • Line 3: "Tee XL": "XL" is not one of the parent's Size values (S, M). Shoppers may not be able to choose this variation. Add the value to the parent row or fix the spelling.

Once the listed rows are fixed, check the file again; the checker also looks for the other problems in WooCommerce's import code, so you do not trade one error for the next.

Questions

What does "A new variation cannot be created because "%1$s" is not an option of the parent product's "%2$s" attribute." mean in WooCommerce?
This is a message template in WooCommerce's import code: %1$s is the value from your variation row, such as "XL", and %2$s is the attribute name, such as "Size". Since WooCommerce 11.1 it appears when "Update existing products" is ticked and a variation row has a SKU that is not in your store yet. The parent has the attribute, but not that value, and a shopper could never pick it, so WooCommerce skips the row. On a normal import of new products there is no message, and the variation may not be selectable in your store.
How do I fix it?
Add the value to the parent's list, for example Attribute 1 value(s) "S, M, XL" on the parent row. Or change the variation's value to one the parent already has. For a custom attribute (Attribute 1 global is 0) WooCommerce compares the text exactly, so "xl" and "XL" are different. Copy the value from the parent row. Import the file again.
Can I leave the value blank?
Yes. In WooCommerce's import code an empty value is allowed: it makes an "any" variation that matches every choice of that attribute.

Other WooCommerce import errors

Sources

Based on WooCommerce 11.2.2's import code and documentation. Not tested on a live store.