How to fix it
- Put the parent product's SKU in the Parent column of every variation row.
- Include the parent row (Type variable, with its SKU) in the same file, above its variations.
- Check the spelling of each Parent SKU against the parent row's SKU.
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,,,Size,S,0 variation,TEE-M,Tee M,1,visible,taxable,1,3,20.00,,TE,Size,M,0
What the checker says about it
- Line 3: "Tee S" is a variation with no Parent, so it fails with "Variation cannot be imported: Missing parent ID or parent does not exist yet." Put the parent product's SKU (or id:123) in the Parent column.
- Line 4: "Tee M": the parent "TE" is not in this file. If no product in your store has that SKU, WooCommerce attaches the variation to a temporary "Import placeholder for TE" product and deletes both when the import finishes, so the variation is lost. Add the parent row (Type variable) to the file above its variations, or check the SKU.
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 "Variation cannot be imported: Missing parent ID or parent does not exist yet." mean in WooCommerce?
- A row with Type variation needs a Parent: the SKU of its variable product, or id: followed by the parent's ID. When the Parent cell is empty, the row fails with this message. When the Parent SKU is not in your store or your file, WooCommerce attaches the variation to a temporary "Import placeholder" product and, in WooCommerce 11.2, deletes both when the import finishes, so the variation is lost. A variation listed above its parent row also goes wrong: its attributes are dropped.
- How do I fix it?
- Put the parent product's SKU in the Parent column of every variation row. Include the parent row (Type variable, with its SKU) in the same file, above its variations. Check the spelling of each Parent SKU against the parent row's SKU.
Other WooCommerce import errors
- Variation cannot be imported: Parent product cannot be a product variation
- Invalid catalog visibility option.
- Invalid product tax status.
- Unable to use image
- Accents and special characters garbled after a WooCommerce CSV import
- WooCommerce CSV import: variations or attribute options not showing
- 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 11.2.2 source: class-wc-product-csv-importer.php: https://github.com/woocommerce/woocommerce/blob/11.2.2/plugins/woocommerce/includes/import/class-wc-product-csv-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.