Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client reported that a coupon was functioning correctly in the primary language (English) but not in the secondary language (German). This issue was due to the add-to-cart URLs not being translated to match the product variations in the secondary language. The Elementor Price Table widget used did not automatically present URLs for translation, which is necessary for proper functionality in a multilingual setup.

Solution:
We recommended ensuring that the 'Make themes work multilingual' and 'Language filtering for AJAX operations' options were enabled under WPML >> Languages. The client was advised to manually translate the add-to-cart URLs to correspond with the translated product variations. This involved editing the page in the original language, switching to the secondary language, and setting the correct URLs for the buttons. Additionally, the client needed to register the Elementor Price Table element using a custom XML configuration to make the URLs translatable by WPML. Detailed steps for registering custom Elementor widgets for translation can be found here: https://wpml.org/documentation/support/multilingual-tools/registering-custom-elementor-widgets-for-translation/

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket at our support forum.

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 29 replies, has 1 voice.

Last updated by Carlos Rojas 3 days, 7 hours ago.

Assisted by: Carlos Rojas.

Author Posts
August 19, 2025 at 2:02 pm #17331739

simonM-37

HI Carlos

The process completed (see screenshot), but no joy. It is still rejected the coupon.

Kind regards
Simon

Screenshot 2025-08-19 at 15.58.21.png
August 20, 2025 at 9:49 am #17333593

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Simon,

Please follow these steps and let me know the results:
- Edit the page in the original language
- Switch to the secondary language using the language switcher that appears in the admin bar (top)
- Click on the option to 'edit anyway' that will appear in a pop-up window
- Set the correct URL for the first button
- Save the changes
- Check if the issue disappears for that button in the frontend in the secondary language

Can you tell me the results of the steps described above?

August 20, 2025 at 12:02 pm #17334041

simonM-37

HI Carlos

That workaround works, and the correct add-to-cart URL is used in German for all buttons (I changed all of them).

For the mobile version, the HTML version already contained the correct versions.

However this is only a workaround, since if I make further edits to those translations in the future using the standard translation procedure (see screenshots from WPML/Elementor), the German edits which were saved will be lost again. WPML should be able to translate these URLs automatically or at least present them in the translation screen for manually entry/translation.

The two checkout/coupon screenshots are once from adding the product with the mobile version of the site, and once from a desktop browser.

Kind regards
Simon

Screenshot 2025-08-20 at 13.56.59.png
Screenshot 2025-08-20 at 13.56.50.png
Screenshot 2025-08-20 at 13.51.50.png
Screenshot 2025-08-20 at 13.46.41.png
August 20, 2025 at 12:16 pm #17334182

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Simon,

Please check now: hidden link

August 20, 2025 at 12:57 pm #17334294

simonM-37

Hi Carlos

What exactly, should I be checking for? I don't see any difference and the URLs are still not presented for translation for non-mobile versions (those coming from the Elementor Price Table widget) ...

Kind regards
Simon

August 20, 2025 at 2:35 pm #17334629

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Simon,

Now you can see and translate the URLs when translating the page.

Please edit the page in the original language -> Add a slash and the end or remove the last slash of the URLs in the buttons -> Save the changes and update the translation. Now you should see the option to translate the URLs.

August 20, 2025 at 3:14 pm #17334786

simonM-37

Hi Carlos

OK, now I can see the URLs available to translate as expected ... but how did you get that to appear? By adding or removing a slash at the end of the URL?

What is the "correct" (or expected) definition of the URL? With of without a slash at the end?

Because I will have to fix this on our production site too...

Kind regards
Simon

Screenshot 2025-08-20 at 17.12.23.png
August 20, 2025 at 3:34 pm #17334860

simonM-37

Hi Carlos

I tried the following on Production:

1) Edited the button and added and removed the slashes.
2) Published in Elementor.
3) Tried to translate it: no changes, no URLs presented to translate.

Then I tried:

4) Edited buttons and added a slash on all of them. Then published.
5) Then edited the buttons again and removed all the slashes and re-published.
6) Tried to translate it: no changes, no URLs presented to translate.

I cannot seem to "force" an update on Production to make WPML realise there was some change... All of these "workarounds" still seem a bit clunky to me. It still feels like I'm trying to "trick" WPML into doing something it should be capable of already.

Kind regards
Simon

August 21, 2025 at 7:31 am #17336149

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Simon,

1.- I registered the price table element by following the steps described in this guide: https://wpml.org/documentation/support/multilingual-tools/registering-custom-elementor-widgets-for-translation/ and you can find the code in WPML -> Settings -> Custom XML Configuration tab. By registering the element, I added the URL so WPML 'knows' there is a URL in the element.

2.- The URL can have a slash or not at the end, that makes no difference at all, however, adding/removing the last slash and then re-saving the page forces the WordPress core to refresh the entry in the database for that page which let WPML knows there is a change and allows it to 'pick up' the URL fields already defined in the previous step.

To solve the problem in the production site you must copy/paste the XML code from the dev site in WPML -> Settings -> Custom XML Configuration tab to the same place in the production site. Then edit the page, edit the URLs (add/remove the last slash), save the changes and update the translation.

August 22, 2025 at 8:22 am #17339613

simonM-37

Hi Carlos

Firstly, this works for the moment in production (thank you!) and the coupon can be applied successfully in German.

However, I don't feel this is acceptable as the permanent solution as I am just using a standard, well-established Elementor Pro widget, which has been in the plugin for years, not a custom widget, and have never had to go through this procedure (https://wpml.org/documentation/support/multilingual-tools/registering-custom-elementor-widgets-for-translation/) to translate other standard Elementor widgets.

Has something changed with the WPML Plugin to make this procedure become necessary? It should not be necessary for standard Elementor or Elementor Pro widgets in my opinion.

Furthermore, the Custom XML provided, while it works, is only masking the core bug in WPML which is preventing it from not making the URLs visible using standard translation procedures.

Can you please give me an idea of when is WPML planning to fix this issue permanently so i can remove the custom XML from our website?

Kind regards
Simon

August 22, 2025 at 9:02 am #17339778

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Simon,

The Elementor shortcodes register by WPML are listed here: hidden link and the 'price-table' element is not listed. That is the reason why I had to register the element on your site.

I'd recommend that you contact the Elementor support service and ask them to create the wpml-config.xml file to register all the elements missing.

August 22, 2025 at 9:19 am #17339820

simonM-37

Hi Carlos

Hmm, OK.

Just to know for future reference then: did you download that Multilingual Tool as a plugin and then delete the plugin on our dev site? I don't see that plugin listed in our list of installed plugins?

Kind regards
Simon

August 22, 2025 at 9:22 am #17339886

simonM-37

Correction: I see the plugin now as "Mutlilingual Tools", I was looking for WPML something...

Can the plugin be deleted now?

Kind regards
Simon

August 22, 2025 at 9:23 am #17339904

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Simon,

The Multilingual Tools plugin is still installed in hidden link and you can download it from this page: https://wpml.org/documentation/support/multilingual-tools/

August 22, 2025 at 9:23 am #17339905

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Yes, you can delete the plugin now.