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 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 -
- 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 -

Supporter timezone: Europe/Madrid (GMT+02:00)

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by Nigel 10 months, 3 weeks ago.

Assisted by: Nigel.

Author Posts
May 27, 2023 at 10:00 am #13725689

Javier

Hello, when sending a client an order confirmation link, the content is mixed between English (main language) and French (secondary language, this should be 100% over this page):
hidden link

If that link does not work, just have a look at this screen shot please:
hidden link

I can guarantee that all corresponding fields have been correctly translated (attributes walnut and leather, product name, payment method, etc.). This bug seems to appear on this kind of links and also sometimes in the order confirmation auto-generated email too.

Thank you for your kind help.

Best Regards,

Javier Petrement

May 29, 2023 at 12:25 pm #13732281

Nigel
Supporter

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

Hi Javier

To be able to check what's happening can you provide a staging server that I can use for testing, including a test payment option to be able to complete the checkout process?

Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

If there is a particular product it would be helpful to test with, let me know.

May 30, 2023 at 9:23 am #13737511

Javier

Hello Nigel,

I think there was an issue when creating the new password for your profile. Please allow me to enter the login data again in a private reply, thanks!

May 30, 2023 at 10:37 am #13738553

Nigel
Supporter

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

Sure, no problem, I've set another private reply.

But for future reference, you should be able to go back and edit your previous reply.

May 30, 2023 at 1:43 pm #13740407

Javier

Hi, thanks for that info, I have updated my previous message with the correct password.

May 30, 2023 at 4:08 pm #13741161

Nigel
Supporter

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

Thanks for that, that works.

It looks like a custom checkout table with those details, and I don't see any plugin that would be responsible for that, so I'm guessing it's the theme.

Let me check the Kallyas theme on my own test site to see if I can locate the problem.

I'll do that in the morning and get back to you.

May 31, 2023 at 10:48 am #13746281

Nigel
Supporter

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

Hello again Javier

I'm confused about the URLs you shared previously, because I don't arrive at the same when I go through the process of adding a product to the cart and proceeding to the checkout on your site, and when I do that—just go through the normal steps—the checkout page I arrive displays the translated texts correctly (see screenshot).

So what are those URLs you shared? How do you arrive at them?

Screenshot 2023-05-31 at 11.46.31.png
May 31, 2023 at 11:56 am #13747311

Javier

Hi, please proceed to pay the order but don't enter your credit card details, an order then will be added to this screen (status pending payment I think):
hidden link

Then do this please:
hidden link

June 1, 2023 at 4:57 pm #13756829

Nigel
Supporter

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

Sorry for the delay getting back to you, it has proven quite time-consuming trying to replicate this problem. I found it difficult to get a consistent workflow on a clean test site where I could generate an Order with pending payment status to then return to and work with.

Now that I have that, and have understood what occurs, I'm inclined to say that it is expected, and this really isn't a problem at all.

The particular page that you arrive at, to complete the payment of a pending payment order, the strings that are shown on that page relating to the custom product attributes, but also some other texts like the chosen shipping option, are set at the time the order is made.

So, if on the front end the user is going through the checkout process and generates the order in French, then those texts are stored and subsequently displayed in French. Regardless of whether you go to the page to complete payment in French, or switch to English for this payment page, those texts would be displayed in French.

Similarly, if you go through the checkout process in English, then when the order is created those texts as displayed on that particular page will be displayed in English, even if, on that page you switch language to view it in French.

WooCommerce uses a particular template specifically for that page, and it outputs texts in such a way that they don't get updated when visiting the page in a different language. Even though the texts may have translations available (that are readily visible on other front-end pages).

I could escalate this and request that my colleagues see whether it is possible some way to make those texts translatable, but I want to check with you first if that is really necessary.

Unless you find different than what I've established on my test site, if a customer goes through the cart and checkout process on your site in French, and they later have to return to that page to complete payment, then the texts will be shown in French.

If another customer goes through the cart and checkout process on your site in English, and they later have to return to that page to complete payment, then the texts will be shown in English.

The only scenarios in which they would see the texts in a different language are if they use the language switcher having gone to that page to see the payment page in a different language, or if from the back end someone does what you show, going from the link on the order page and then manually changing the language part of the url.

What are your thoughts?

June 1, 2023 at 5:31 pm #13756969

Javier

Hello, I appreciate that you have replicated the issue, on my side, I have never been able to replicate my site on a staging environement.
I don't think your conclusions are correct, let me explain,
I just now created an order on my producion site, it was done via the French pages of the product page and cart checkout. I aborted during the credit card details screen and now have an order
I use the link to the customer payment page and noticed that it seems correct in English but has the mistakes we are talking about in French as you can see here:
Order here: hidden link
payment page here:
hidden link

This does not match with your conclusions I think, please do escalate if this helps get the issue solved, thank you.

June 2, 2023 at 9:17 am #13760009

Javier

Hello, one more example of an order made in French and then the confirmation link (when switched to French) reflects hybrid content:
hidden link

As this order will be paid soon, here is a screen shot of what we are seeing :
hidden link

Thank you

June 2, 2023 at 9:50 am #13760381

Nigel
Supporter

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

OK, I've put together all of the details and have escalated this.

I'll let you know when I have some feedback.

June 6, 2023 at 7:20 am #13775503

Nigel
Supporter

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

This will get fixed in a future update of the WCML plugin (it has been added to the board for the 5.3.0 release).

My colleague has proposed a workaround, which I just tested on my local site where it works, if you want to try the same on your site.

It requires editing the file wp-content/plugins/woocommerce-multilingual/inc/class-wcml-orders.php.

Around line 131 you should see the function adjust_order_item_in_language declared.

Immediately after, add a line with "return;", as shown here:

	public function adjust_order_item_in_language( $items, $language_to_filter = false ) {
		return; // workaround for issue wcml-4186
		if ( ! $language_to_filter ) {
			$language_to_filter = $this->sitepress->get_current_language();
		}

You will need to re-apply the workaround if you update the plugin before the fix is included.

Can you check and verify it works?

June 13, 2023 at 4:02 pm #13819223

Javier

Hello Nigel,
Thanks.
As I am not comfortable making changes as suggested, I prefer to wait for the release that includes the fix, when is it expected to be released?
Best Regards,

Javier Petrement

June 14, 2023 at 10:22 am #13823995

Nigel
Supporter

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

Hi Javier

We will soon release WCML 5.2 (possibly next week) and then work will begin on version 5.3, which will address this issue (as well as others). It's hard to say how long that development cycle will take, but I would imagine it would be at least a couple of months.

I'll leave this ticket escalated, and will notify you when the fix is published.