How to import meta for WooCommerce multiple products

In some situations, you have to import some meta for hundreds of products. Then, manually it can do by
1. Open a product.
2. Update the meta.
3. Update the product.
If there are hundreds of products, we have to repeat this process a hundred times. Which is really complex to maintain.

There are plugins for import custom meta for existing products. But, they are costly.

There is a way that will save repeating work and save cost. Here it is:

Assume for sample purpose, we will set a meta name woo_feed_gtin. In this case, I am a small biased for my company. woo_feed_gtin is custom meta in CTX Feed plugin. We will set this meta for 10 products, which IDs are 34,33,32,31,75,24,22,21,20,18

  1. Find out the sample_products.csv in woocommerce/sample-data.
  2. Open sample_products.csv in gedit or notepad or any text editor.
  3. Follow this CSV format
´╗┐ID,"Meta: woo_feed_gtin"
34,123456
33,789101
32,234567
31,891012
75,345678
24,910123
22,456789
21,101234
20,567891
18,012345

4. Save sample_products.csv file.
5. Go to Dashboard->Tools->Import and Run Importer which is labeled by WooCommerce products (CSV)
6. This will open the import page. Choose sample_products.csv which we edited.
7. CHECK the following checkbox. This is important, because it just this product’s meta updated, which exists. If we don’t, then some unwanted products will create if this ID is not found.

8. Click on the big Continue button.
9. Then a new step named Column Mapping open like this

10. If everything is okay, then click on the big Run the importer button.
11. It import CSV file we choose at first. If everything is okay, we get a success page.

Then we check these 10 products. I found every product sets a new custom meta.

Leave a Reply

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