How to fix it
- On the parent row, list every attribute with all its values, such as Attribute 1 name Size and Attribute 1 value(s) "S, M, L".
- On each variation row, use the same attribute name and exactly one value.
- Set the parent's Type to variable, and put the parent row above its variation rows.
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-S,Tee S,1,visible,taxable,1,3,20.00,,TEE,Colour,Red,0 variation,TEE-M,Tee M,1,visible,taxable,1,3,20.00,,TEE,Size,"M, L",0
What the checker says about it
- Line 3: "Tee S": 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.
- Line 4: "Tee M": the variation has 2 values for "Size" (M, L). A variation takes one value per attribute; WooCommerce keeps only the first, "M". Make one variation row per value.
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
- Why does this happen?
- A variation only works when its parent row carries the same attribute. If a variation says "Colour: Red" but the parent has no Colour attribute, WooCommerce drops the attribute from the variation, which then matches any choice. A variation can also take only one value per attribute: "S, M" keeps only S. And the parent must have Type variable and sit above its variations: a variation listed before its parent loses its attributes.
- How do I fix it?
- On the parent row, list every attribute with all its values, such as Attribute 1 name Size and Attribute 1 value(s) "S, M, L". On each variation row, use the same attribute name and exactly one value. Set the parent's Type to variable, and put the parent row above its variation rows.
Other WooCommerce import errors
- WooCommerce CSV import: wrong prices, or products out of stock
- WooCommerce CSV import: columns show "Do not import" on the mapping screen
- File is empty. Please upload something more substantial.
- A new variation cannot be created because the parent product has no "%s" attribute.
- A new variation cannot be created because "%1$s" is not an option of the parent product's "%2$s" attribute.
- A new variation can only be created for a variable parent product.
- All checks
Sources
- WooCommerce 11.2.2 source: abstract-wc-product-importer.php: https://github.com/woocommerce/woocommerce/blob/11.2.2/plugins/woocommerce/includes/import/abstract-wc-product-importer.php
- WooCommerce: Product CSV Importer and Exporter: https://woocommerce.com/document/product-csv-importer-exporter/
Based on WooCommerce 11.2.2's import code and documentation. Not tested on a live store.