Importundo

Reference · since 1.2.0 · needs WooCommerce active

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.

FieldAccepts
SKUThe code that identifies this product. Use it as the matching key so a second import updates your products rather than duplicating them.
Regular priceNumbers only, no currency symbol. The active price is worked out from this and the sale price.
Sale priceLeave 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 dateOptional. The sale price only applies from this date. Leave empty to start it straight away.
Sale end dateOptional. The sale ends after this date and the regular price applies again.
Stock quantityGiving a quantity turns stock management on for that product, and a quantity of nought marks it out of stock.
Stock statusinstock, outofstock or onbackorder. Only needed when you are not giving a quantity.
Backordersno, notify or yes.
WeightIn your shop's weight unit. Numbers only.
Length, width, heightNumbers only, in your shop's dimension unit.
Tax statustaxable, shipping or none.
Tax classThe slug of a tax class you have set up, or empty for the standard rate.
Virtualyes or no. A virtual product needs no shipping.
Downloadableyes or no.
Sold individuallyyes or no. Limits customers to one per order.
Purchase noteShown 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

FieldWritten as
Product typesimple, grouped, external or variable. Left empty, a product is simple.
AttributesColour: 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 variationsThe same format, for a variable product. These are the attributes customers choose between.
Default attributesWhich variation is selected when the page opens, e.g. Colour: Red.
Parent productFor a variation: the SKU of the product it belongs to. The parent may be a row further up the same file.
Gallery imagesImage addresses separated by commas. They are downloaded like the featured image, and only if downloading images is switched on.
UpsellsSKUs separated by commas. A SKU that is not in your shop is reported rather than ignored.
Cross-sellsSKUs separated by commas, shown in the basket.
Grouped productsFor a grouped product: the SKUs it contains, separated by commas.
Downloadable filesManual: https://…/manual.pdf | Warranty: https://…/terms.pdf
External product URLFor an external product: where the buy button sends the customer.
Buy button textFor an external product, e.g. Buy on Amazon.
Featuredyes or no.
Catalogue visibilityvisible, 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.