How to Update Stock in WooCommerce
A fairly common task with WooCommerce products is updating stock levels. This may occur because of an inventory count, a lack of automated inventory control, or because the stock levels are maintained by a third party, as happens with drop shipping.
Whatever the cause, manually updating stock levels can be very time-consuming. In this article, we show you how to automate this task using WP All Import.
Table of Contents
- Typical Scenarios When Updating Stock in WooCommerce
- Updating Stock in WooCommerce Using a New Import File
- Updating Stock in WooCommerce Using an Updated Import File
- Updating Stock in Woocommerce Through Bulk Edits
- Related Info
- Related Videos
Typical Scenarios When Updating Stock in WooCommerce
There are three typical scenarios when updating stock in WooCommece:
- You have a set of products already defined in WooCommerce, but the stock is maintained by a third party, and that third party sends you a product file that you haven’t imported before. This file contains stock data.
- A third party sends you a product file that you have imported before, and it contains updated stock data.
- You want to edit the product stock levels in your store more efficiently than using the WooCommerce interface.
We show you how to address each of these scenarios below.
Updating Stock in WooCommerce Using a New Import File
In this scenario, a third party has sent you a file that you haven’t imported before (i.e., the file structure is new), and that file contains stock levels for products that you created or imported previously. You want to apply the new stock levels to your existing products.
Step 1: Create a New Import for WooCommerce Products
Navigate to All Import › New Import, load the product file, choose Existing Items, and select WooCommerce Products as the import type.
Step 2: Review the Product Import File
This screen lets you check the structure and content of the import file. As you can see below, the file is very simple, containing only a few key product fields along with the stock field.
Step 3: Map Incoming Stock Level Data to the Stock Qty Field
Map the incoming stock data element to the Stock Qty field in the Inventory tab of the WooCoommerce Add-On section of the Drag & Drop screen:
Click the Continue to Step 4 button at the bottom (not shown).
Step 4: Match Existing Products and Update the Stock Qty Field Only
In the Import Settings screen:
- Choose Custom Field in the section titled Records in this import file will be matched with Products on your site based on…
- Drag and drop the sku data element to the Value field.
- Select the Choose which data to update option in the section titled For each record in this import file, every time this import is run…
In other words, you’re matching the incoming data to your existing products based on SKU, and you’re only going to update specific fields, which you get to specify further down the screen:
Click Continue at the bottom of the screen (not shown).
Step 5: Finish the Update
Click the Confirm & Run Import on the next screen. When the import completes, your WooCommerce stock levels should be updated as expected.
Updating Stock in WooCommerce Using an Updated Import File
In this scenario, the third party has sent you a new version of a file that you have imported previously.
Because WP All Import records all the settings used for import, all you have to do in this situation is go to All Import › Manage Imports and click the Run Import button for the import that you ran previously.
This will automatically apply the updated stock levels to the affected products.
Updating Stock in WooCommerce Through Bulk Edits
In this scenario, you need to manually edit the existing stock levels in your WooCommerce store. Doing so through the WooCommerce interface can be tedious, so WP All Import gives you the opportunity to edit the data in a spreadsheet instead.
Step 1: Export the Products You Want to Edit
Navigate to All Export › New Export and create a new product export:
In Action 3 above, you can see that we created a filter to limit the export to simple products only. For more information on filters, see Filtering Import Data with XPath.
After you click the Customize Export File button, you’ll be brought to the Drag & Drop interface. Here, you simply drag and drop your export columns from the available fields on the right into the column selection area on the left. In this case, make sure you drag and drop the Stock field:
Click the Continue button, followed by the Confirm & Run Export button on the next screen. When the export completes, you’ll see this screen:
To download your export file, click the blue CSV button.
Step 2: Change the Stock Levels in a Spreadsheet
Open the product CSV file in your favorite spreadsheet and use copy-and-paste, search-and-replace, and formulas to make large-scale changes to your stock quantity data.
Save your changes.
Step 3: Reimport the Updated Stock Levels
Go to All Export › Manage Exports and locate your recent export. To import your changed file, simply click the Import with WP All Import option on the right:
This will create a new import:
Upload your changed file, then click Continue to Step 2. This will bring you to the Drag & Drop screen. If you look at the relevant fields, you will see that WP All Import has used the information from the export to automatically map the correct fields:
It also knows which fields to update:
To apply your changes, just complete the import.
How to Update Stock in WooCommerce — Related Info
- Official Documentation: Syncing Stock Levels
- Official Documentation: How to Import WooCommerce Products from CSV and XML
- Official Documentation: How to Export WooCommerce Products to CSV, Excel, and XML
- Official Documentation: How to Bulk Edit WooCommerce Products
- The 5 Best WooCommerce Product Import Plugins
- The 5 Best WooCommerce Product Export Plugins
How to Update Stock in WooCommerce — Related Videos