How to fix it
- Write prices with a dot before the cents and no thousands separator, such as 1299.00.
- Write In stock? as 1, 0 or backorder, and Stock as a whole number or leave it blank.
- Write Published as 1 to publish, 0 for private, -1 for draft.
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... simple,MUG-1,Mug,yes,visible,taxable,outofstock,ten,"12,50",,,,,
What the checker says about it
- Line 2: "Mug": Published is "yes". WooCommerce reads only 1 (published), 0 (private), -1 (draft) and 2 (pending review), so this product will be private. Write 1 to publish it.
- Line 2: "Mug": In stock? is "outofstock". WooCommerce reads only 1, 0 and backorder (in lower case); any other text counts as yes, so this product will be marked in stock. Write 1 (in stock), 0 (out of stock) or backorder.
- Line 2: "Mug": Stock "ten" is not a whole number. WooCommerce reads it as 0 and turns on stock management. Write a plain whole number such as 1200, or leave it blank to not track stock.
- Line 2: "Mug": Regular price "12,50" has a comma. On a store whose decimal separator is a dot (the default), WooCommerce removes the comma and reads 1250. Write the price with a dot before the cents and no thousands separator, for example 1299.00.
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?
- WooCommerce does not reject these values; it imports them differently from what they seem to say. On a store whose decimal separator is a dot, a price of 12,50 becomes 1250. "In stock?" reads only 1, 0 and backorder: "outofstock" or "no" counts as in stock, and a blank cell as out of stock when Stock is also blank. Stock of "ten" becomes 0, Published "yes" makes the product private, and a blank Published cell makes it a draft.
- How do I fix it?
- Write prices with a dot before the cents and no thousands separator, such as 1299.00. Write In stock? as 1, 0 or backorder, and Stock as a whole number or leave it blank. Write Published as 1 to publish, 0 for private, -1 for draft.
Other WooCommerce import errors
- 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.
- Sorry, you are not allowed to upload this file type.
- All checks
Sources
- WooCommerce 11.2.2 source: wc-formatting-functions.php: https://github.com/woocommerce/woocommerce/blob/11.2.2/plugins/woocommerce/includes/wc-formatting-functions.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.