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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 11 months ago.

Assisted by: Long Nguyen.

Author Posts
January 16, 2023 at 3:07 pm #12827609

xavierD-17

Hello,

Since I have updated plugins (included woocommerce) all orders made on the website with the following payment systems (paypal and stripe) have their VARIATION ID changed to the buyers default language. This is causing problems as I can't sync in the orders with my order manager system as it just takes the main language id variation (english).

Could you please let me know how to fix it?

January 17, 2023 at 7:04 am #12831133

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi there,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

It is an expected behavior when the product in the order will display the translation in the language that is set in the User Profile > Language.

If you want to get a variation ID in a specific language, please use the filter hook wpml_object_id, please read more on the documentation https://wpml.org/wpml-hook/wpml_object_id/

You might need to add some custom code to your plugin to sync the variation ID in the English language with the order manager system. However, we do not normally offer support for custom code, I would recommend you contact one of our certified partners that will be more than happy to help you with this. In this link you will find a list of our certified partners: https://wpml.org/contractors/

Look forward to your reply.
Thanks

January 17, 2023 at 4:23 pm #12836133

xavierD-17

Hi!,

Thanks for your answer.

Could you please let me know where I need to put that filtering code to make all order's ID VARIANTS in english (default language of the website) instead of the customer's user language.

Many thanks,

January 17, 2023 at 4:38 pm #12836195

xavierD-17

I have noticed that the PRODUCT ID is always in english no matter the customer's user language but the ID VARIANT (size) is in the customer's user language. It doesn't make sense to mix both languages, either everything is in the website's default language (english) or in the customer's user language (french, spanish or english).

This seems to be a WPML bug. We really need to have everything in the website's default language.

Looking foward to your answer.

thanks

January 18, 2023 at 3:48 am #12838965

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

>> I have noticed that the PRODUCT ID is always in English no matter the customer's user language but the ID VARIANT (size) is in the customer's user language.

I do not see that issue on my demo site. The product ID in the order will display the translation in the current language that the user selected in the User Profile. Please check this screenshot
hidden link

You can always get a variation ID in a specific language, by using the filter hook wpml_object_id. Please read more on the documentation https://wpml.org/wpml-hook/wpml_object_id/
If you don't know how to do that, I would recommend you contact one of our certified partners that will be more than happy to help you with this. In this link you will find a list of our certified partners: https://wpml.org/contractors/

Look forward to your reply.
Thanks

The topic ‘[Closed] variation ID changes to secondary language when orders changes to processing’ is closed to new replies.