How to Import and Update WooCommerce Products

Kaira    Blog    Plugins    How to Import and Update WooCommerce Products
WP All Import - How to Import and Update WooCommerce Products

Many WooCommerce stores consist of products from multiple suppliers. Over time, these product offerings tend to change. New products are added, old ones deleted, and ongoing products evolve.

The ideal way of handling this situation is to automatically update your WooCommerce store using supplier data files rather than manually inputting/changing this data.

In this article, we’re going to do this using WP All Import — a top plugin which makes it very easy to Import and Update WooCommerce Products. To follow along, use this convenient sandbox feature and select WooCommerce Store as the demo type.

Bulk Importing New WooCommerce Products

Pretend that a new product supplier has sent you a list of products to add to your store, which you can access at this URL: https://drive.google.com/uc?export=download&id=1hiH7x1D8E6gLED6pwWw05Nnqf5MPQGN7.

Before importing this list, let’s examine its contents:

WP All Import - Product list

To keep this walk-through quick and simple, we’ve added just four new products. But the process would be the same to add thousands of products.

These products are all of the Simple product type but WP All Import also handles:

  • Variable Products
  • External/Affiliate Products
  • Grouped Products
  • Product Bundles
  • Downloadable Products
  • Virtual Products

Finally, the import columns contain simple values except these two:

  • The Content column uses HTML to define the main description for each product.
  • The URL paths in the Image URL point to an online image.

Let’s begin!

How to Import and Update WooCommerce Products:

Step 1: Import the New Products

In the WordPress main menu, go to All Import -> New Import:

WP All Import - New Import
  1. Choose Download a File.
  2. Choose From URL.
  3. Copy and paste the URL https://drive.google.com/uc?export=download&id=1hiH7x1D8E6gLED6pwWw05Nnqf5MPQGN7.
  4. Click the green Download button. WP ALL Import will attempt to validate the file.
  5. After the file validation is complete, select New Items.
  6. In the Create new… list, choose WooCommerce Products.
  7. Click Continue to Step 2.

Step 2: Review the Product Import File

The Review Import File screen is used to verify that WP All Import has correctly interpreted the import file:

WP All Import - Review Import File

In this case, the four incoming records appear to be correct.

Click Continue to Step 3.

Step 3: Match the Incoming Columns to the WooCommerce Product Fields

The Drag & Drop screen lets you map the incoming data columns to the WooCommerce fields:

WP All Import - Match the Incoming Columns to the WooCommerce Product Fields
  1. Expand the Title & Description panel.
  2. Drag the title, content, and short description incoming columns to the fields shown above. Note that the column and field names don’t have to match. It’s the mapping that counts.

Collapse the Title & Description panel and…

WP All Import - Mapping columns
  1. Expand the WooCommerce Add-On panel.
  2. Set the Product Type to Simple product.
  3. Select the General tab.
  4. Drag the sku and price incoming columns to their WooCommerce target fields.

Next…

WP All Import - WooCommerce target fields
  1. Select the Inventory tab.
  2. Set Manage stock? to Yes.
  3. Drag the incoming stock column to the WooCommerce Stock Qty field as shown above.

Close the WooCommerce Add-On panel and…

WP All Import - WooCommerce mapping columns
  1. Expand the Images panel.
  2. Select the Download images hosted elsewhere option.
  3. Drag the imageurl incoming column to the edit box as shown above.

When you complete these steps, click Continue to Step 4 to proceed to the Import Settings screen:

WP All Import - Import Settings
  1. Click the Auto-detect button. This identifies the combination of incoming columns that constitutes a unique identifier for the new products.
  2. Click Continue.

This will bring you to the Confirm & Run screen:

WP All Import - Confirm and Run import
  1. You should see all green checkmarks. If so, click the Confirm & Run Import button.

This will start the import. When it completes, you will see this confirmation screen:

WP All Import - Import Complete

To verify that the import worked, navigate to Products -> All Products in the WordPress main menu.

WP All Import - Verify the import worked

Your new products should appear at the top of this listing with correct names, SKUs, stock levels, prices, and images.

Hold your mouse over the Name field of one of the products in the above list and then click the View link when it appears. This will confirm that all the other data elements were also imported:

WP All Import - completed

For more information on importing products, see Import WooCommerce Products from any XML or CSV.

Simple Updates of WooCommerce Product Data

Seven months after adding your new WooCommerce products, your supplier sends you a new product file URL: https://drive.google.com/uc?export=download&id=1E4h9vA7x2E0dqp_o_miD2baQvhTmiQ7Z.

This file contains the following:

  • Three of the products you just created (IDs 1000, 1002, and 1003).
  • A new product, ID = 1005, called the “New Stainless King”.
  • Numerous price and stock quantity changes.

Note, also, that it omits ID = 1001, Thermos Stainless King.

Here’s what the file looks like:

WP All Import - import

How do you incorporate all of these changes into your WooCommerce store?

Luckily, WP All Import maintains a record of all previous data imports and exports, including the settings that were used.To see this, navigate to All Import -> Manage Imports in the WordPress main menu, hold your mouse over the import that you just ran, and click the Import Settings link when it appears:

WP All Import - Manage imports

This will bring you to the Import Settings screen:

WP All Import - Save Import Configuration
  1. Replace the original URL with the new update URL at https://drive.google.com/uc?export=download&id=1E4h9vA7x2E0dqp_o_miD2baQvhTmiQ7Z.
  2. Click Save Import Configuration.

This will return you to the Manage Imports screen:

WP All Import - Managing Imports
  1. Click the Run Import button for your import.

This will launch your import and place you in the Confirm & Screen. Here, just click Confirm & Run Import.What happened to your WooCommerce product data? After the import completes, go to Products -> All Products in the WordPress main menu. Your product listing should appear as follows:

WP All Import - Products

As you can see, SKUs 1000, 1002, and 1003 had their Stock and Price values updated.

The new product, SKU = 1005, was successfully added to the store.

And the product that was absent from the updated import file, SKU = 1001, was left completely alone. This makes sense because existing products may have sales transactions associated with them and shouldn’t be deleted without your permission

But this is just the default behavior. If you really want to take control of product updates…

Custom Updates of WooCommerce Product Data

In this section, we’re not going to do walkthroughs of all the examples because that would take too long. Instead, we’re just going to identify some of the more advanced update features.To start, navigate back to All Import -> Manage Imports in the WordPress main menu and again click the Import Settings link for your import:

WP All Import - Record Matching

This time, focus on the Record Matching panel at the bottom. 

The following settings explain WP All Import’s default behavior when updating existing data:

  1. Create new products from records newly present in your file. If checked, this does exactly as it says and is the reason that the new product, SKU= 1005, was created in the previous section.
  2. Delete products that are no longer present in your file. As you can see, this is unchecked, which is why SKU = 1001 was allowed to remain in your store even though it had been omitted from the update file. To have deleted 1001, you would have had to check this option.
  3. Update existing products with the data in your file. If checked, allows WP All Import to change information for existing products. This is what made it possible to update the stock and price values.
  4. Skip products if their data in your file has not changed. This is just an efficiency setting, as there is no point updating products if none of their data has changed.
  5. Update all data. This default updates all data for each product in the update file.
  6. Choose which data to update. This is where WP All import offers its full power/flexibility for product updates, which will describe next.

Controlling What You Update

Click on the Choose which data to update option in the preceding screen. The Record Matching panel will expand as follows:

WP All Import - Record Matching

As you can see, this screen allows you to control what happens to every possible data element during an update.

We can’t possibly walk through all of these options, so will give you just one example. Focus on the section outlined by the red box. This is the Update only these Custom Fields, leave the rest alone option inside the Custom Fields section.

WooCommerce stores many of its key values, such as stock quantity and price, in custom fields. By specifying that WP All Import should only update the _regular_price field, this means that the stock custom field should not be updated. If we had applied this setting to our previous update, it would have changed only the price of the existing products and not their stock levels.

If you look immediately below the red box, the Leave these fields alone, update all other Custom fields setting allows you to take the opposite approach, i.e. to protect specific fields from updates while updating all others.

This same level of granular control is available for many of the options in the Record Matching panel. If you want to take things even further, you can use WP All Import’s built-in PHP function editor to apply conditional programming logic to virtually any field in your update.

This is why we view WP All Import as the best data import/export plugin for WordPress/WooCommerce. It allows you to tackle simple tasks like import and update WooCommerce products in seconds using a drag & drop interface, and also to handle complex tasks by going as deep into the weeds as possible.

Related Information

How to Import/Export WooCommerce data such as Customers, Products, and Orders

Read more from our blog

We offer some useful insights in to the world of WordPress.
Have a read through some of our WordPress blog posts for more help on WordPress.

Join Our Newsletter!

Our mail list is now at zackaira.com, a blog helping you to start an online business and learn digital marketing to generate traffic to your new venture!

We respect your email and will not spam!