Whether you’re moving your products to another site or just want to bulk edit the wholesale prices, it’s important to know the correct way of importing wholesale data with your products in the CSV file.
You have multiple options for importing as there are many tools on the market for it.
In this article, we will cover two ways:
- Importing using the built-in WooCommerce CSV import/export tool
- Importing using the popular WP All Import plugin
Importing using built-in WooCommerce Product import/export tool
In WooCommerce version v3.1, they introduced the Product Import/Export tool, which you can use to download and upload your product CSV file with wholesale data.
We recommend doing the following steps:
1. Create one or two products and set the Regular Price and Wholesale Price. If you’re using WooCommerce Wholesale Prices Premium, you can apply more features such as Minimum Order Quantity, Minimum Order Step and etc. Doing this will generate the custom meta fields when you export the Product CSV.
2. Afterwards, go to Products > All Products, at the top part, click the Export button. Make sure to check the Export Custom Meta before clicking Generate CSV.
3. Once the download is completed, open the CSV file and you should find the wholesale price meta key that should be named like this: wholesale_customer_wholesale_price
4. Edit the CSV by adding the wholesale prices, and other wholesale data to your products and then save your file.
5. Import your CSV file back using WooCommerce Product Import tool. You’ll notice that our custom meta keys are already set as Import as Meta. Just click the Run Importer
6. After the upload is complete, your wholesale prices should now be applied to the products on your site.
Importing using WP All Import
You can also import the wholesale data by using WP All Import with their WooCommerce Add-On Pro. We suggest reading their documentation first on how to import WooCommerce products here.
1. Go to WP All Import Dashboard, whether you like to add new items or update existing ones, and select the option for WooCommerce Products
2. Continue to Step 3 and out the necessary data for the fields (Title, WooCommerce fields), then on the Custom Fields, click See Detected Fields.
3. It should auto-detect the available custom fields and you should find our custom meta keys like wholesale_customer_wholesale_price. You’ll notice that it will have a value by default. Remove the value and replace it by dragging the title key from the upper right box to the field value instead.
4. Continue to step 4 and click the Auto-detect for the Unique Identifier. Select the necessary settings before you continue.
5. Proceed until you finish the import process. The wholesale data should now be applied to your Products.
Importing Product Quantity Based Wholesale Pricing
Our Quantity Based Wholesale Pricing metadata is saved as serialized data in the database. Previously, it was not possible to import/export this data in the product CSV when using the WooCommerce Product Import/Export Tool. But as of WooCommerce Wholesale Prices Premium version 1.17, you can now export user-friendly readable data that you can edit and import back to your Product page.
The two important meta keys to remember are Meta: wwpp_post_meta_enable_quantity_discount_rule and Meta: wwpp_post_meta_quantity_discount_rule_mapping.
The value of the first meta key should be set to yes if you want to enable quantity-based wholesale pricing.
The second meta key determines the values of the quantity discount pricing for that product.
For example, if I have this quantity based discounts in a product:
The corresponding value in your CSV for meta:wwpp_post_meta_quantity_discount_rule_mapping, should be:
Based on this format, you can easily edit and copy this to your other products to apply the Quantity based wholesale pricing during your import.
In case you’re having visibility issues after importing, we recommend to visit this guide.