How to update product cost in WooCommerce by exporting and importing all products

Follow the steps below to update product cost in WooCommerce by exporting, updating and importing all products.

NOTE: This guide assumes you use the default cost-price field generated by the ProfitMetrics plugin.

If you are using a different field to manage your cost price read this guide instead: LINK PENDING


  1. Export Products from WooCommerce
  2. Update the cost prices of each item
  3. Import Products in WooCommerce

Part 1: Export Products from WooCommerce

  1. Login to WooCommerce
  2. Click "Products"
    Exporting and Importing Products Data into Google Sheets - Step 3

  3. Click "All Products"
    Exporting and Importing Products Data into Google Sheets - Step 4 (1)

  4. Click "Export"
    Exporting and Importing Products Data into Google Sheets - Step 5
  5. Select ID and SKU under "Which columns should be exported"
    Exporting and Importing Products Data into Google Sheets - Step 10
  6. Under "Export custom meta?" check "Yes, export all custom meta" 
    Exporting and Importing Products Data into Google Sheets - Step 20
  7. Click "Generate CSV"
    Exporting and Importing Products Data into Google Sheets - Step 22
  8. Open the downloaded file in a spreadsheet and remove/delete all columns except ID, SKU, Meta: _cost_price and Meta: _cost_price_variation
    Skærmbillede 2024-03-19 kl. 20.17.46

Part 2: Update the cost prices of each item

TIP: We recommend using Google Sheets

For simplicity, we recommend updating both "Meta: _cost_price" and "Meta: _cost_price_variation" with the same cost value. This saves you the time and hassle of having to identify which products are variations and which are not.
If you need to combine data from WooCoomerce with data from another system you can use the VLOOKUP formula to combine the data.

Skærmbillede 2024-03-19 kl. 20.37.14
Once you are done, export your file as a new csv.

Part 3: Import Products in WooCommerce

  1. Click "Products"
    Exporting and Importing Products Data into Google Sheets - Step 3
  2. Click "All Products"
    Exporting and Importing Products Data into Google Sheets - Step 4 (1)
  3. Click "Import"
    Importing and Updating Products from CSV in WooCommerce - Step 3
  4. Click "Select file" and select the CSV file you just created
    Importing and Updating Products from CSV in WooCommerce - Step 4
  5. Under "Update existing products" check "Existing products that match by ID or SKU will be updated. Products that do not exist will be skipped"
    Importing and Updating Products from CSV in WooCommerce - Step 6
  6. Click "Continue"
    Importing and Updating Products from CSV in WooCommerce - Step 6 (1)
  7. Check the Column name and Map to field match and click "Run the importer"
    Importing and Updating Products from CSV in WooCommerce - Step 7
Thats it. The cost prices are now being updated.