WooCommerce products
Choose Products as the target and the mapping screen offers the product fields alongside the usual title, content and categories. Everything else in this documentation still applies: the preview, the whole-file check, the unchanged-row skip and the rollback all work the same way.
A product is not a post with meta on it
Write the product fields yourself and you get something that looks right in the database and does not exist as far as the shop is concerned: no price, not purchasable, missing from the catalogue.
WooCommerce derives the active price, the stock status and the row in its own lookup table from the values you set. So this importer saves products through WooCommerce itself rather than writing post meta, which is why an imported product behaves like one you typed in by hand.
WooCommerce support appears only when WooCommerce is active. Without it the importer works exactly as it does for posts and custom post types. Nothing from WooCommerce is bundled, and nothing in it is modified.
Product fields
Header names are matched loosely, as everywhere else — Regular price, regular_price and RRP all find the same field.
| Field | Accepts |
|---|---|
| SKU | The code that identifies this product. Use it as the matching key so a second import updates your products rather than duplicating them. |
| Regular price | Numbers only, no currency symbol. The active price is worked out from this and the sale price. |
| Sale price | Leave a cell empty for a product that is not on sale. WooCommerce ignores a sale price that is not lower than the regular price. |
| Sale start date | Optional. The sale price only applies from this date. Leave empty to start it straight away. |
| Sale end date | Optional. The sale ends after this date and the regular price applies again. |
| Stock quantity | Giving a quantity turns stock management on for that product, and a quantity of nought marks it out of stock. |
| Stock status | instock, outofstock or onbackorder. Only needed when you are not giving a quantity. |
| Backorders | no, notify or yes. |
| Weight | In your shop's weight unit. Numbers only. |
| Length, width, height | Numbers only, in your shop's dimension unit. |
| Tax status | taxable, shipping or none. |
| Tax class | The slug of a tax class you have set up, or empty for the standard rate. |
| Virtual | yes or no. A virtual product needs no shipping. |
| Downloadable | yes or no. |
| Sold individually | yes or no. Limits customers to one per order. |
| Purchase note | Shown to the customer after they buy. |
Product categories, tags and brands map from the usual header names: Categories, Tags, Brand.
Attributes, galleries and the rest
| Field | Written as |
|---|---|
| Product type | simple, grouped, external or variable. Left empty, a product is simple. |
| Attributes | Colour: Red, Blue | Size: Large. Where your shop already has an attribute of that name it is used, so filtering keeps working; otherwise the attribute is added to this product alone. |
| Attributes used for variations | The same format, for a variable product. These are the attributes customers choose between. |
| Default attributes | Which variation is selected when the page opens, e.g. Colour: Red. |
| Parent product | For a variation: the SKU of the product it belongs to. The parent may be a row further up the same file. |
| Gallery images | Image addresses separated by commas. They are downloaded like the featured image, and only if downloading images is switched on. |
| Upsells | SKUs separated by commas. A SKU that is not in your shop is reported rather than ignored. |
| Cross-sells | SKUs separated by commas, shown in the basket. |
| Grouped products | For a grouped product: the SKUs it contains, separated by commas. |
| Downloadable files | Manual: https://…/manual.pdf | Warranty: https://…/terms.pdf |
| External product URL | For an external product: where the buy button sends the customer. |
| Buy button text | For an external product, e.g. Buy on Amazon. |
| Featured | yes or no. |
| Catalogue visibility | visible, catalog, search or hidden. |
Variable products
A variable product is described as a parent row followed by one row per variation, each naming its parent by SKU. The parent row sets Product type to variable and lists the choices under Attributes used for variations; each variation row carries its own SKU, price and stock, and the attribute values that identify it.
Set the matching key to SKU and a second run updates the same products and the same variations instead of duplicating them.
An example file
sku,type,post_title,regular price,sale price,stock,attributes,variation attributes,parent
SH-100,variable,Harbour Shirt,,,,"Colour: Blue, Sand | Size: S, M, L","Colour, Size",
SH-100-BS,,Harbour Shirt — Blue, S,49.00,39.00,12,"Colour: Blue | Size: S",,SH-100
SH-100-BM,,Harbour Shirt — Blue, M,49.00,39.00,8,"Colour: Blue | Size: M",,SH-100
SH-100-SM,,Harbour Shirt — Sand, M,49.00,,3,"Colour: Sand | Size: M",,SH-100
Run it with --match=meta._sku on the command line, or pick SKU as the matching key on the mapping screen, and the file becomes repeatable: the next run updates prices and stock on exactly these products.
What undo covers
All of it. A rolled-back product import deletes the products and variations it created and restores the ones it changed to the values they held — prices, stock, attributes, terms and the modified date included — under the same guarantee as any other import. The rollback reference covers the limits, which are unchanged.