How to Update Product Field Values in Bulk During WooCommerce Import?

Are you looking for a way to bulk update product field values like product prices, quantity, etc? If so, you are at the right place then. In this article, we will show you how to update product field values using the Product import action.

We will be using the free version of the WooCommerce product import export plugin by WebToffee to update product field values.

Follow the below steps to update product field values in bulk using the Product Import Export Plugin by WebToffee.

  1. Install the plugin

    From the WordPress dashboard, go to Plugins > Add New.  Search for WebToffee Product Import Export Plugin.

    basic version of Product import export for WooCommerce

    Once you have found the plugin, click on Install Now and then activate the plugin.

  2. Navigate to Import Products

    From the dashboard, go to WebToffee Import Export (Basic) > Import.
    import option from the basic import export plugin

  3. Select the post type

    Chose the post type to import as Product and then click the button Step 2: Select import method.

    import post type as product

  4. Select Advanced import method

    Select the import method as Advanced import where you can import data after a detailed process of filtration, column selection, and other advanced options. Also, the settings can be saved for future use.
    advanced import for column mapping
    To import a product, upload a CSV file. Tap on Step 3: Map import column button after uploading your file.

  5. Update Product Field Values

    The product field names would be mapped to the column names of your CSV file. Columns are automatically mapped only if a matching header name is discovered in the input file.
    column mapping from CSV file

    The import mapping column of the WooCommerce Product import export plugin is shown in the video. Select the drop-down icon next to the product field. There are references to each column in the CSV file. From the drop-down menu, select the column you want to correspond with the product field.

    transform option in mapping column

    When a matching header name is found in the input file, columns are automatically mapped.
    While importing the map columns some of them might have noticed a pencil symbol under Transform.
    By clicking on the pencil-like icon it will open a pop-up to set the value for the product fields.

    expression column when clicking transform option

    Use the transform option to update the value to an existing product field value during import. For eg: [{stock} + 10].
    In short, it maps a column in the input file with a product field, carries out the specified computation task, and then updates the current field value with the new one (result after computation). 

    Expression pop up for updating product values in WooCommerce

    Expression: The field value can both be changed by using any of the operators +, *, /, -, (), &, @, or string constants.
    Eg: [{regular_price}+10]
    Input file columns: From the dropdown, select the column that needs to be changed.
    Output/ Preview: Based on the first record from the input file, a sample value will be generated.
    Eg: Initially the regular price is 30 and when adding 10 to the regular price, the sample value is 40.
    Note: When used in an expression, columns with null values in the input file may result in syntactic issues.

Use Cases for Bulk Import Product Field Values in WooCommerce

1. Assign Any Constant Value You Need

For example: Say you want to assign the value- ‘flat rate’ to the product field ‘tax:product_shipping_class’. Click on the pencil icon corresponding to the product field, and set the field value as ‘flat rate’.

assigning any constant value in the product field value.

Upon import, the shipping class of all the products imported via the CSV will be changed to ‘Flat rate’ (as shown below).

updated product field value after importing

2. Increase the Value of the Price

For example: Increasing the cost by ten dollars.

Enter ‘[{regular_price}+10]’ in the Set value for column window corresponding to the ‘Price: Regular Price’ row:

increase value using expression for regular price

If the initial price was 30, the changed regular price value will now be changed to 40.

updated product field value in WooCommerce after importing

3. Decrease the Value of a Sale Price

For example: Taking 10 off the selling price.

As seen below, enter ‘[{sales_price}-10] in the Set value for column window for the product field ‘Price: Sale Price’:

decreasing a value of a sale price

The revised sale price (if the initial price was 25) will now be as follows, upon import:

decresed the sale price after import

4. Appending a Value

For example: Add the term ‘By Sonadora Cafe’ at the end of the product title.

Put ‘{post_title}& By Sonadora Cafe’ in the Product Title row under the transform window:

appending a value to the product field

The updated value will display as follows upon import:

appending a value in the product field in WooCommerce after importing

5. Prepend a Value

Add the constant text ‘Description:’ before the original Product Description.

Enter ‘Description: {post_content}’ in the Product Description row, in the transform window.

prepending a constant text

When imported, the value will show up as follows:

prepending the value in product field after importing

6. Combine Two Columns

There can be times when you want to combine two or more columns into one during import. Using the Transform option, you may easily integrate them.

Example: Use the expression, ‘[{sku} {post_title}]’ to combine the two columns “SKU” and “Product name.”

combining 2 columns

When imported, the values of the merged columns will show up as:

combined product field value in woocommerce after importing

7. Increase the Price by a Percentage

Example: If the original regular price during import is 40 and you want to raise the price by 5%, use the equation ‘[{regular_price}*1.05]’ in the column ‘Price: regular price’.

(The regular price must be multiplied by 0.05 in order to be raised by 5%.)

Make sure to put square brackets around the expressions.

updating product field value in Woocommerce by percentage

The changed normal price value will be displayed as:

updated regular price by percentage in WooCommerce

8. Updating the Stock

When mapping, enter ‘[{stock}+5]’ corresponding to the field ‘Inventory: Stock column’ to add 5 units to the stock quantity of all imported goods.

updating the product field value of stock quantity in WooCommerce

The updated stock value will show up as:

updated stock quantity as product field value after importing

Wrap Up

The transform option helps you to edit/change the file columns during the importing process. This feature is very useful when you need to update or fix any mapping data for bulk products. The Product Import Export Plugin we mentioned in this article also has a premium version with advanced import export options. See below for more information.

Hope this article led you in the right direction. We encourage you to read how to update specific WooCommerce product prices using CSV.

If you have any queries, please mention them below.

Article by

A bibliophile, movie buff, shutterbug, potter head who turned into a writer. Currently writing content for WebToffee.

Got any query? Please leave a comment or reach out to our support

Your email address will not be published. Required fields are marked *