Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 6 months ago.

Assisted by: Prosenjit Barman.

Author Posts
November 6, 2023 at 9:57 am #14736179

polysA

I am trying to: create a WooCommerce WPML translation for an existing product from 'en' to 'el' (language) using the "/wp-json/wc/v3/products" API end-point but instead of creating a new translation, the WooCommerce/WPML API creates a new product in 'en' language that is not connected to its "translation_of" English Language product.

Link to a page where the issue can be seen: hidden link
English (working): hidden link
Greek (problematic): hidden link

I expected to see: the Greek Language product to be created under the 'el' language and as a translation to the 'en' English Language product.

Instead, I got: a new product in 'en' language that is not connected to its "translation_of" English Language product.

wpml_bug.jpg
November 7, 2023 at 7:28 am #14743577

polysA

Kind reminder.

We have not yet been able to solve this issue ourselves.

November 7, 2023 at 9:11 am #14744955

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having and will try my best to assist you in this matter.

I conducted a test by creating a product and its corresponding translation through the WooCommerce REST API and can confirm that everything is working properly. The product and its translation are appropriately linked. You can view the results in these screenshots: Translation executed via REST-API [ hidden link ], and in the backend [ hidden link ].

Please be informed that the "lang" and "translation_of" parameter depends on the WooCommerce Multilingual plugin. Could you please make sure that the latest version of the WooCommerce Multilingual plugin is activated on your site?

If it is activated, please make sure that the translated products have been created as per the instructions mentioned here: https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/#create-products

Let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit