WooCommerce Cost of Goods Importer
Map SKU to unit cost from a supplier sheet or an old plugin's export into WooCommerce's core Cost of Goods field, with a margin preview.
How WooCommerce's Cost of Goods field works
Cost of Goods Sold (COGS) is a core WooCommerce feature, off by default. Turn it on at WooCommerce → Settings → Advanced → Features → “Cost of Goods Sold.” Once it's on, the product CSV importer and exporter read and write a “Cost of goods” column; while the feature is off, that column is ignored even if it's in the file.
Upload a sheet with a SKU column and a cost column (common names like “Cost”, “Cost Price” or “Wholesale Cost” are matched automatically). If your file also has a price column, the tool shows the margin those costs imply.
Sample sheet, 5 SKUs
- Average cost
- $8.36
- Average margin (using the Price column)
- 67.9%
For the Stoneware Mug specifically: cost $6.50, price $18.00, margin about 63.9%.
Importing costs
- 01
Turn on the feature
WooCommerce → Settings → Advanced → Features → “Cost of Goods Sold.” Costs won't import without this.
- 02
Upload your cost sheet
A SKU column and a cost column are enough. Choose whether the rows are simple products or variations.
- 03
Re-import
Download the file and import it at Products → All Products → Import with “Update existing products” checked. Rows are matched by SKU.
Pitfalls
- If the Cost of Goods Sold feature is off, the imported cost column is silently ignored, not an error.
- Rows with no SKU, or no usable number in the cost column, are skipped and listed so you can fix the source file.
- For a variation's cost, set “These rows are” to Variations and use each variation's own SKU, not the parent's.
Questions people ask
What happens if I haven't turned on Cost of Goods Sold yet?
The import runs without an error, but WooCommerce ignores the Cost of goods column until the feature is switched on.
Does this calculate my margin automatically?
Yes, if your file also has a price column (Price, Regular Price, or similar). It's shown as an average across the matched rows.
Can I import cost for variations, not just simple products?
Yes. Switch “These rows are” to Variations and make sure your SKU column has each variation's own SKU.
Where does this cost show up later?
In your order line items and in WooCommerce's profit reports, once Cost of Goods Sold is turned on.
Related tools
Last reviewed 30 September 2026.
Sources: WooCommerce docs: Cost of Goods Sold (COGS) · WooCommerce docs: Product CSV Importer & Exporter
