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 Dražen 1 year, 1 month ago.

Author Posts
March 29, 2024 at 2:27 pm #15464653

dominikC-4

We have a page that uses url paramter (pmpro_level) to display correct information about an option chosen by a user:

membership-account/membership-checkout/?pmpro_level=9

Unfortunatelly when user changes a language with language switcher while being on that page, WPML changes to a corresponding translated page but without query paramter:

/pl/zamowienie/

which breaks functionality

You can reproduce it by going to our test site:

hidden link

Click Buy on any plan. You will need to register with any data.

After sucessfull registration you'll land on the checkout page with url ending ?pmpro_level=X

Switch a language with Language switcher. You land on polish version of the page without url paramter

March 29, 2024 at 3:26 pm #15464875

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me try to provide quick help.

You can preserve these URL arguments by going to WPML → Languages and scrolling to the Language switcher options section. The arguments you want to preserve should be added as a comma-separated list.

- https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/

Let us know how it goes.

Regards,
Drazen

preserve-url-arguments.png
April 6, 2024 at 10:06 pm #15491002

dominikC-4

awesome, thanks a lot