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 thread is resolved. Here is a description of the problem and solution.

Problem: Link to a page where the issue can be seen: /my-account/orders/

I expected to see: Pay button URL such as https://yoursitename/en/checkout/order-pay/5228/?pay_for_order=true&key=wc_order_5wVQkVEiyqadf&force_pay_order=1

Instead, I got: https://yoursitename/en/checkout/?pay_for_order=true&key=wc_order_5wVQkVEiyqadf&force_pay_order=1

WPML is stripping the endpoint order-pay/ordernumber from the URL and the pay button no longer works.

Solution: Our specialists will include a fix for this issue in a future release of the plugin, according to the errata page this fix will be included in the v4.6.0.

In the mid time the workaround is to set "Pages" to the default translate mode.

Relevant Documentation: https://wpml.org/errata/when-pages-are-set-to-display-as-translated-all-endpoints-in-my-account-page-for-secondary-languages-lead-to-defaut-language/

This topic contains 12 replies, has 2 voices.

Last updated by Carlos Rojas 3 weeks ago.

Assigned support staff: Carlos Rojas.

Author Posts
May 19, 2019 at 7:09 pm #3842391

douglasF-4

I am trying to: pay for an order that was interrupted

Link to a page where the issue can be seen: /my-account/orders/

I expected to see: Pay button URL such as hidden link

Instead, I got: hidden link

WPML is stripping the endpoint order-pay/ordernumber from the URL and the pay button no longer works.

NOTE: This is the same issue discussed and "resolved" in these two threads:
https://wpml.org/forums/topic/order-pay-and-order-id-get-stripped-out-of-pay-button-if-wpml-is-active/
https://wpml.org/forums/topic/wrong-url-for-pay-buttons-when-wpml-is-active/

I went ahead and deleted the icl_sitepress_settings from wp_options tables, this TEMPORARILY solves the problem.

when I change post type translations for Pages at WPML > Settings > Post Types Translation from
"Translatable - only show translated items" to
"Translatable - use translation if available or fallback to default language"

the problem is back.

For some reason this specific setting for pages post type translations is creating the error.

I am not going to give you access to my site so please do not ask. I just wanted to post this here in the brief hope that this bug could be fixed in a future release. Until then, I will leave the pages set to "Translatable - only show translated items".

I wont hold my breath that this gets fixed, but if you need any further information from me please reply to this thread.

May 20, 2019 at 9:27 am #3845563

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hello,
Thank you for contacting WPML support.

I have created a test site with a fresh new WordPress install. I also installed and setup WPML plugins.

I would like to ask you to activate and setup Woocommerce and Woocommerce Multilingual plugins and try to reproduce the issue (please only add the minimum information to reproduce the issue). You can access to the backend of the test site directly using this link: hidden link

Were you able to reproduce the issue?

Kind regards,
Carlos

May 20, 2019 at 10:00 am #3845837

douglasF-4

Hi Carlos,

I was able to reproduce the issue on your test site. Using the account you gave me, you can see the problem on this page, the "pay" button link has the proper order-pay endpoint removed from the URL: hidden link

If you go to WPML settings and change "Post Types Translation" for "Pages (page)" back to "Translatable - only show translated items" then the "pay" button link contains the correct URL with order-pay endpoint.

Regards,

Douglas

May 20, 2019 at 2:09 pm #3847699

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for your feedback.

I visited the link provided (hidden link) and I can't see the "pay" button. Could you attach an screenshot to your next answer and point our where is this button? This way I will have a better understanding.

Regards,
Carlos

May 20, 2019 at 4:47 pm #3849041

douglasF-4

the order was set to cancelled status, probably after some time interval. In the backend woocommerce/orders you can change the status from "cancelled" to "pending payment" and then you will see the pay button problem on myaccount/orders page. Screenshots attached

May 21, 2019 at 8:58 am #3853409

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi there,

I visited the backend of the site and fixed a problem related to the 'product_type' taxonomy and translated the 'Uncategorized' taxonomy. Then a changed the order #31 to 'pending payment' and now I can see the 'Pay' button working correctly for both languages.

Could you tell me if this button is working correctly for you after fixing the 'product_type' taxonomy issue?

Regards,
Carlos

May 21, 2019 at 9:16 am #3853463

douglasF-4

Hi Carlos,

For me the Pay button still has the wrong URL. Just to recap, the current URL is:

hidden link

The correct URL in this case should be:

hidden link

Regards,

Douglas

May 21, 2019 at 9:23 am #3853535

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi Douglas,

When you click on the Pay button, do you get redirected to the checkout process within the right order?

Regards,
Carlos

May 21, 2019 at 9:46 am #3853787

douglasF-4

yes but the behavior is not correct. Please try both links in my previous message you will see the difference. In the second link you are correctly redirected to the payment provider to close the purchase.

May 21, 2019 at 6:19 pm #3858167

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for your message.

I consulted our specialists about this issue and there is an errata that claims the issue is solved: https://wpml.org/errata/when-pages-are-set-to-display-as-translated-all-endpoints-in-my-account-page-for-secondary-languages-lead-to-defaut-language/

However you were able to reproduce the issue in a fresh new install I have escalated this ticket to our 2nd tier of support where our 2nd tier specialists will take a deeper look at this issue and will try to find a solution.

Thank you very much for your patience and understanding!
Best regards,
Carlos

May 22, 2019 at 10:29 am #3864281

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi there,

Our specialists will include a fix for this issue in a future release of the plugin, according to the errata page this fix will be included in the v4.6.0.

In the mid time the workaround is to set "Pages" to the default translate mode.

Best regards,
Carlos

May 25, 2019 at 6:37 am #3888879

douglasF-4

My issue is resolved now. Thank you!

May 27, 2019 at 6:40 am #3893769

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi there,

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos