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 1 reply, has 2 voices.

Last updated by Prosenjit Barman 8 months, 3 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
August 7, 2023 at 7:29 am #14161535

cons-2

Hello.
We noticed that the language switcher widget is not working correctly on the WooCommerce checkout page.

Situation: We send emails from the WooCommerce admin area.
These emails go, for example, to customers whose payment fails and contain the payment link for the order.

By default, the payment link in the email is in the admin language.
This is often wrong.
We solved it with custom coding.

What we noticed: When a customer calls up the payment link, the pay_for_order parameter is missing in the language switcher widget links.
As a result, the customer cannot pay if he wants or has to change the language.
The translated link is incorrect.
It affects all links in the widget.
Even the language that the user is currently viewing in the frontend.

Page accessed:
- /en/checkout/order-pay/123/?pay_for_order=true&key=wc_order_xyz

Example widget links:
- EN: /en/checkout/order-pay/123/?key=wc_order_xyz
- FR: /fr/caisse/order-pay/123?key=wc_order_xyz
- DE: /kasse/order-pay/123?key=wc_order_xyz

The "pay_for_order" parameter is missing.

Note: I'm just talking about the widget language switcher, not the menu language switcher. I haven't tested the menu language switcher.
It doesn't matter in which language I initially call up the payment page. Always the same error.

footer-widget_wpml_Screenshot_20230807_092055.png
August 8, 2023 at 1:04 pm #14169437

Prosenjit Barman
Supporter

Languages: English (English )

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

Hello There,
Thanks for contacting WPML Support. I will try my best to assist you in this matter.

I understood that a specific parameter gets removed from the URL when you switch to a different language. Would you please try using the "Preserve URL arguments" feature? This feature helps to pass the parameter when you switch to other languages.

Please check this documentation to understand the procedure: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/

Give it a try and let me know if that helps to solve the issue or if you need further assistance. I will be happy to help.

Best Regards,
Prosenjit

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.