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
- Find out the
sample_products.csvin gedit or notepad or any text editor.
- 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
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.