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 Itamar 5 months, 3 weeks ago.

Assigned support staff: Itamar.

Author Posts
April 22, 2019 at 10:35 am #3655163

gerasimosL

Hello!

We are developing a WooCommerce shop for a client.
I need a list with 2 columns:
1. all WooCommerce product IDs from the first language (Greek) and
2. the relevant IDs for the translated product of the second language.

Would be great if you could provide an SQL statement.

Thanks!

April 22, 2019 at 6:54 pm #3657945

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

As general information, I can say that for what you are trying to achieve you would need to find the ID of the original product in the 'wp_icl_translations' table and then the value of the 'trid' cell would be the connector to all the translated products. So if you create a query with the 'trid' value you would find all the original product and all its translations.

But I'm sorry this is as much as I can help here. Providing a custom code solution is out of the scope of this forum.
We have extensive information for developers at the following link.
https://wpml.org/documentation/support/
And we have API hooks which you can use here.
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/
https://wpml.org/documentation/related-projects/woocommerce-multilingual/wcml-hooks-reference/

At this point, if you need further help, I would suggest you consider contacting one of our certified partners from this link: https://wpml.org/contractors/
Before doing so please have a look also here:
https://wpml.org/documentation/about-wpml-contractors/what-type-of-work-you-can-expect-from-contractors/

With our contractors, you might get the custom assistance you need to get on with your project.

Best Regards,
Itamar.