Forum Navigation
You need to log in to create posts and topics.

Product import with translations

Hello again 🙂

I would like to ask how to solve the proper product import from CSV to Wocommerce with the tranlations.

The WC does exports the CSV  with the columns containing translations, but there is no option to import them?




Please advise,



Thank you


The issue is caused by WooCommerce Importer, it forcibly convert the meta_keys to lower-case, e.g., "_post_content_morelang_nml_de_DE" will be converted to "_post_content_morelang_nml_de_de" after import, then More-Lang fails to locate the translation fields.

Fortunately, the default Wordpress Exporter/Importer do it right. On the admin screen, click "Tools"->"Export", select "Products", it will generate a .xml file. Then click "Tools"->"Import", select "WordPress" (you might need to install the "Wordpress Importer" plugin if it's not installed).   But if your products are not simple(e.g., there are variable-products),  this approach might lose some relations.

If the Wordpress Exporter/Importer approach doesn't work, you have to import it using WooCommerce Importer, then after import, you can try to use SQLs to convert the meta_keys back(I'll describe this in detail if it's needed and your SQL skill is not enough to fulfill it).


Thank for a hint. 

However it became a bit awkward ..

The XML export doesn't help much as it is complicated to edit.  The CSV import might do the work as I need to edit the fields in Excel and import all products to the WC.

I did try to install external import plugins but it doesn't work either, also it does mess in the WC export files or even maybe in the tables(?) I didn't check but had to delete all products and import again (without translations .. 🙁   )

Perhaps the SQL command might be the solution can you give me hand here I am not familiar with database scripts.. ?
Alternatively if there is some simple solution through PHP MyAdmin?


Please advise. 






As I mentioned above, if you use non-WooCommerce solution, you might lose some data relations for non-simple products.

As for the SQL solution, it's not complicated.

In your case, you have 2 non-default languages, their locales are no_NO & de_DE, then after import, you can run the following SQLs:

UPDATE wp_postmeta SET meta_key = CONCAT(LEFT(meta_key, CHAR_LENGTH(meta_key)-2), 'NO') WHERE meta_key LIKE BINARY '%morelang_nml_no_no';
UPDATE wp_postmeta SET meta_key = CONCAT(LEFT(meta_key, CHAR_LENGTH(meta_key)-2), 'DE') WHERE meta_key LIKE BINARY '%morelang_nml_de_de';

If it doesn't work, please let me know.