This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is unable to retrieve the translated version of a product using the WordPress REST API. They are trying to access the English version of a product but keep receiving the Danish (original language) version instead.
Solution:
1. To access a specific translated product, use the translated product's ID in the URL without the need to add the
?lang=en
parameter. For example:
https://jumbo.as/wp-json/wc/v3/products/TRANSLATED_PRODUCT_ID
2. To get a list of products in a specific language, include the
lang
parameter in the URL. For example, to get products in English:
https://jumbo.as/wp-json/wc/v3/products/?lang=en
If this solution doesn't look relevant, please open a new support ticket and we will be happy to assist you further.
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 1 reply, has 2 voices.
Last updated by 1 year, 6 months ago.
Assisted by: Long Nguyen.