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 22 replies, has 3 voices.

Last updated by mohamedA-54 6 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
February 7, 2019 at 12:17 am

valentinG-5

I am trying to: When a user purchases a product on my website on the French language, the first email(processing email) goes in French because it recognizes that the user was on the French page. But when i go to the dashboard and change the order status from the dashboard and with the order status the related email triggers, now the second email triggered goes in English and not in French as the first one did when user was on the French page.

For example user buys and receives (order-processing) email in French. Then i go to the dashboard and set order status to completed and the (order-completed) email triggers but in this case the user purchased on French and received the first email on French, so the order-completed email should be in French too but wpml doesn't work correctly somehow and the completed email goes in English. So when user purchases on french apart from the first email, all other emails i will trigger from the order-status update should be in french and vice-versa for other languages.

I want WPML and woocommerce to send the correct emails i have translated and this issue fixed.

Please do a purchase test to check the issue using "free" as a coupon to take off 100% of the price.

Note: (Emails sometimes will not come to the inbox so you might need to check the SPAM/JUNK box)

February 8, 2019 at 9:43 am #3174151

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML Support.

This has been a known issue for a while, but should work in WooCommerce Multilingual 4.4.0 which was published few days ago:

https://wpml.org/errata/an-order-completed-e-mail-is-sent-to-the-purchasing-user-in-the-default-site-language/

Can you update all your WPML and addons and test then?

You can see all the latest versions here - https://wpml.org/account/downloads/

Kind regards
Bruno Kos

February 8, 2019 at 10:17 am #3174333

valentinG-5

Yes that worked apart from one email which had only its content translated as it should but the subject line and the header title of email weren't translated.

The email that wasn't translated for me was the order-on-hold email which is related to the On-Hold order status.

If you want to do a test and check what's the issue, as i told you before you can use "free" as a coupon for the purchase and when you go to the order dashboard in order to trigger the on-hold email you should first put the order from processing to > pending payment and then from pending payment to > on-hold to trigger the email.

Please check the screenshot below to see better the situation.

February 8, 2019 at 10:40 am #3174554

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

In other words, WooCommerce Multilingual 4.4.0 resolved your initial issue - order-completed being sent to wrong language - while the next (new) issue is that even if sending the correct email now, not all strings are correctly translated within?

If that's the case, for support rules we are able to handle only one issue at a time and this is especially important with recurring issues or more complex things. This practice also helps other WPML users to browse through resolved issues and to find solutions more easily.

If the above is correct, can you close this ticket and open a new one? Let me know!

Regards,
Bruno Kos

February 8, 2019 at 11:46 am #3174852

valentinG-5

Actually i wouldn't say that the update solved the issue totally.

So there were a total of 3 emails triggered to the client when he purchased on French, Processing order email, Order-on-Hold (i edited the content of this email to be like a order shipped email) email and Completed Email. So what happened after the multilingual extension update was this:

1- Processing email was working before and going to the user in French since it got the language from the website, so let's say that this email was working fine. The other two were sending on English even though the order was created on French.

2- Order on hold email which i triggered after processing order, after the update, the content string was translated but the subject line and the email heading are still in English.

3- Order Completed email is translated properly and it is sending in French to the user that purchased on the French website so this was fixed.

So summarizing we can say that the update only solved the order completed email but looks like the other emails (order-on-hold and probably other emails i didn't use apart from processing and completed) weren't fixed.

I can open another ticket for this. Just let me know how to open it properly so it gets solved ASAP and also you can find it faster and more useful to solve this issue.

February 8, 2019 at 12:20 pm #3174981

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

So the Processing order email is not working from what I gather, not even with new WCML, or it worked before but it stopped now, or?

As for 2), you've translated all these strings using any of the following (so through admin strings if not using custom templates), correct?
https://wpml.org/forums/topic/translating-woocommerce-emails-2/

I've tried checking these strings within translation table, however when I try to search the strings, Search button does nothing and could be related to the following:
- I see "WPML Update is Incomplete" - can you perform the full update of all WPML addons and test then and let me know?

Regards,
Bruno Kos

February 8, 2019 at 1:55 pm #3175457

valentinG-5

Processing email is fine, forgot to write that above clearly...

The only email not working correctly is order on hold email. Check the subject line string of that email and the email heading string. These two strings aren't translated when email is sent to user. The content is translated in french but the above strings aren't. (Check screenshot)

The other extensions update is not related to the issue because i updated them on another website i have the same theme and files and the problem persists even there.

If you want you can manually do the update of those 3 extensions remaining because they wouldn't update automatically when i tried. I have provided you with login info and FTP so you can try updating and then also purchasing a product to check the emails. Just be sure to check spam for the emails in case they're not on the inbox. As i told you on the first responses you can use "free" as a coupon and do a test to check what's wrong with the emails.

I think i am being really clear right now and please check everything and test if you want before getting back at me because we're sending tickets back and forth and loosing precious time.

Hope this is solved asap, thanks.

February 8, 2019 at 2:02 pm #3175488

valentinG-5

I updated all the WML extensions so you can go ahead and check freely now what's causing the issue

February 8, 2019 at 2:45 pm #3175779

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I can see that all the strings were properly translated for on-hold so this could be a WCML bug. However, please note that if if we identify this as a bug (either WCML bug or theme compatibility bug), it needs to go through our standard debugging procedures and the more complicated the bug, it will take longer even to get a workaround (if available).

https://wpml.org/purchase/support-policy/

That being said, before escalating this to our 2nd tier, we need to confirm that this is not working on our clean install either. Please see my next private message - you'll find logins for our clean installation and everything ready there. Can you test this there with order emails? I've set check payments so you can easily make orders without providing any payment info.

Emails will most likely not go thorough - however, this plugin will pick up data about their content as if they did:
hidden link

In the meantime (as I am closing for the week shortly and most of our supporters, along with dev team don't work weekends), you may want to try a workaround as described here:
https://wpml.org/forums/topic/customer-emails-orderer-on-hold-paragraph-not-trans/#post-930682

Regards,
Bruno Kos

February 8, 2019 at 2:47 pm
February 9, 2019 at 10:21 am #3178204

valentinG-5

Hey Bruno, if you paid just a little bit attention to the tickets so far you would know that i had a problem with the translated email and not with emails. I also did specify which email wasn't being sent in the correct translation.

So you might want to do a few things before sending me a testing environment with a product which wasn't translated, with the emails that weren't translated and also with a language that i don't know to translate.

How are you supposed to check if the issue also persists on the clean installation when you haven't done the proper translations. If i buy the product in English the emails on English will send correctly and i wasn't complaining about that if you remember. So don't just send me un-complete testing environments just to fill up the ticket here.

I tried doing the translation of the emails myself and i noticed that you had placed ORDER_ON_hold as the first email client receives after he purchases instead of the PROCESSING email which is the default email of woocommerce.... Very smart of you but nobody told you to do that. If you recall i had already explained to you that the first email that goes to the client (Processing email, the default email of woocommercE) probably takes the language data from the website and sends the email in the proper language...

But if you trigger the second email, in this case should be the *Order on hold*, you'll have to go to the order dashboard and change the statuses there and the email will get triggered automatically and sent in the wrong language....

You did change the first email from Processing to Order on hold, but i did a test and triggered the email from the dashboard again. And the result was that, if you triggered the on-hold email from the dashboard doing this (set order status to pending > update, then set to ON HOLD > update), you'll see that the On-hold order email got sent to the user but only with the content translated and the Subject + Email Heading are still in English...

So my advice is that next time if you want to replicate an issue for which you want to be sure before solving it, you must have at least the same environment to do that. Because with the edits you did there, if i hadn't noticed this test would have been for nothing and you would have told me that everything's fine with WPML and ORDER ON HOLD got translated fine so the problem is with your website and this ticket would have gone to the Recycle Bin.

I do understand you have a lot of tickets, but i don't like this way of solving things because that's totally unprofessional of you.

Hope you are clear now on everything and this issue gets solved and treated as a BUG asap.
Thanks

P.S (Below i attached the screenshot of the same email, once being translated and the other time not as i explained above. )

February 11, 2019 at 8:34 am #3181334

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I am completely aware that the issue is not an email delivery, but strings not being picked up in particular emails for different languages (on-hold). An email log I suggested allows me to see if with workarounds the issue has been resolved or not and not to test email delivery. It simply picks up emails being sent by WordPress.

So don't just send me un-complete testing environments just to fill up the ticket here.

This is not what supporters are after here. :). However, as you correctly noticed, very often our practice is to ask our clients to reproduce issues on sandbox as no matter how trivial the error might seem, they know the best in which environment and settings they are having these issues. And for many issues it is much faster for them to reproduce than to explain us how to get there as not often they use specific settings.

That being said:

Very smart of you but nobody told you to do that.

What you see inside the sandbox is default WooCommerce environment in which I made no changes apart from initial setup. Actually, since we are not WooCommerce technical support, I am not sure where this is changed - can you point me to this option before I test this behavior once again and submit to our compatibility team?

That's why we do what I mentioned above - very often even the smallest change of setting may cause something not working right and WooCommerce itself combined with WPML may come with hundreds of various settings combinations.

Regards,
Bruno Kos

February 11, 2019 at 10:46 am #3182230

valentinG-5

No problem, nothing was changed i guess, but since we used Checks as payments then the order goes to the on-hold status by default from Woocommerce. As a result to that, then the first email does pickup the language from the website because user was in the translated website. In my case i was using other payment methods and i used cash on delivery or also a coupon which took the order purchase into it's final steps and the payment was counted as complete.

Since that way the payment was counted as complete, therefore the email that triggers by default from Woocommerce is processing order email.

Then i had to trigger the on-hold email from the dashboard and there is where the email didn't send in the correct translated language.

As i told you, the email which gets triggered when user purchases and is on the translated language website, it's always translated because picks up the language data from the translated checkout page.

The issue is with the on-hold which in my case i have to trigger it from the dashboard, so basically triggering the on-hold from the dashboard makes it send the english email instead of the other translated email.

You have to check this. In your environment you can try as i explained on the previous ticket, triggering the on-hold from the dashboard and even from there it does not get sent on the translation language that it should.

Summarizing, the on-hold does not work in any kind of environment if you trigger it from the dashboard.

In your environment:

When we used checks as payment option, the on-hold was triggered automatically and picked up the checkout language data, but when we tried re-triggering it from the dashboard then it didn't send correctly.

In my website:

When user completes purchase he receives Processing email which is completely translated and when i trigger on-hold from the dashboard it doesn't send in the translated language.

Guess everything is clear now. Thanks

February 11, 2019 at 11:07 am #3182414

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I am very sorry if this mislead you - I really didn't know that changing payment gateway would change the order of emails. I simply chose that gateway for the simplicity of faster testing.

One last thing before I escalate this (I will escalate no matter if this works or not, as it is only a workaround, but may help our Compatibility team with faster debugging) - have you tried this workaround if it works in your environment? https://wpml.org/forums/topic/customer-emails-orderer-on-hold-paragraph-not-trans/#post-930682

Regards,
Bruno Kos

February 11, 2019 at 11:22 am #3182478

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

One more thing (hope you don't mind) 🙂 - how actually do you do this:

but when we tried re-triggering it from the dashboard then it didn't send correctly.

None of these seem to be resending on-hold emails from what I see on:
hidden link

Regards,
Bruno Kos