WooCommerce import error: "A new variation cannot be created because the parent product has no "%s" attribute."

What it means: This is a message template in WooCommerce's import code: %s is replaced by the attribute name from your row, such as "Colour". 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. WooCommerce tries to create that variation, sees that the parent product has no attribute with that name, and skips the row. On a normal import of new products there is no message: the attribute is dropped and the variation matches any choice.

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.

Loading the converter...

How to fix it

  1. Add the attribute to the parent row, for example Attribute 1 name "Colour" and Attribute 1 value(s) "Red, Blue", with every value the variations use.
  2. If the parent is already in your store, add the attribute to it on the product edit screen, under Attributes.
  3. Check the spelling: capital letters do not matter, but "Colour" and "Color" are two different attributes.
  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-RED,Tee Red,1,visible,taxable,1,3,20.00,,TEE,Colour,Red,0

What the checker says about it

  • Line 3: "Tee Red": the attribute "Colour" is not on the parent "TEE" (line 2). WooCommerce drops it from the variation, which then matches any value. Add "Colour" with all its values to the parent row.

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 the parent product has no "%s" attribute." mean in WooCommerce?
This is a message template in WooCommerce's import code: %s is replaced by the attribute name from your row, such as "Colour". 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. WooCommerce tries to create that variation, sees that the parent product has no attribute with that name, and skips the row. On a normal import of new products there is no message: the attribute is dropped and the variation matches any choice.
How do I fix it?
Add the attribute to the parent row, for example Attribute 1 name "Colour" and Attribute 1 value(s) "Red, Blue", with every value the variations use. If the parent is already in your store, add the attribute to it on the product edit screen, under Attributes. Check the spelling: capital letters do not matter, but "Colour" and "Color" are two different attributes. Import the file again.
Why do I only see this when updating products?
WooCommerce runs this check only when "Update existing products" is ticked and the variation is new. On a new-products import it does not stop the row. It drops the attribute instead, so the variation imports but matches any choice. The fix is the same in both cases.

Other WooCommerce import errors

Sources

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