Skip Navigation

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

Problem:

Strings in emails from the 'Germanized for WooCommerce' plugin are randomly shown in different languages.

Solution:

We were not able to get the steps to replicate this issue.

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.

Our next available supporter will start replying to tickets in about 7.25 hours from now. Thank you for your understanding.

This topic contains 15 replies, has 2 voices.

Last updated by Itamar 5 months, 1 week ago.

Assisted by: Itamar.

Author Posts
November 5, 2023 at 4:12 pm #14733447

holgerD-8

Hi there, i´ll try to keep it as short as possible.

wpml and woocommerce mails. A never ending story. "Thousands" of support threads from wpml customers. Me too haven´t found a final solution.

to recapitulate | the goal: a woo email to the customer should ALWAYS be sent in the language in which the customer ordered! No matter whether triggered in the front end or in the back end (by the admin).

Still some strings are in the wrong language in my case when sending Woo Mails from the BackEnd. Even sometimes the footer. ALL strings are translated (also the footer). No Plugins which interfere with the woo mails (anymore).

I would like to get a final answer from wpml support: Is it possible to make this work? If so, how?

please let me know.

November 6, 2023 at 5:27 pm #14740629

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

It is true that over the years, we've had several issues with translating strings in WooCommerce emails. Sometimes, it was about strings from the default WooCommerce email templates and sometimes strings from plugins that extend WooCommerce's email functionalities. We treat and investigate every report seriously. To help you further, I need specific details about the issue that you face, please.

Can you please elaborate on the WooCommerce email issue that you face?

Can you tell me which email has this issue?

Please explain to me the steps I should take to replicate this issue.

Regards,
Itamar.

November 6, 2023 at 6:17 pm #14741147

holgerD-8

Hi Itamar, thank you very much for admitting that this is an ongoing matter. I´m not feeling alone anymore.

I can´t give you detailed instructions when and why this is happening. I spent hours/days with myself and wpml support to get to the core of the problem. I eliminated all plugins in regards of designing/modifying the emails and designed them directly in the templates and/or css via functions.php.

After retranslating many many strings, deleting them, translating them again ... standard mails seem to work. But thats not an acceptable way to get things solved. Not for now and not for the future. This is just fiddeling around without a concept. wpml sometimes does what it´s supposed to do, sometimes not. There is no logic.

wpml has, in general, a problem when your page isn´t EN as the main language. It´s getting worse when the user which is able to trigger Mails in the BackEnd (payment accepted, order completed, ecc) is using another language than the main language.

I saw a similar problem and solution in one of the forums for TranslatePress.
Coming from https://wordpress.org/support/topic/woocommerce-emails-in-user-language/#post-14352300

ending on hidden link

i know it´s translatePress, but i´m guessing the underlying problem might be the same.

The question is: How to make sure woo/wpml is checking the meta-field "wpml_language" in the order before sending any email in regards to this order. Whatever language setup your page has, whatever user language your user is set to, from wherever FE/BE the sending of the mail is triggered .... it shouldn´t matter! Why this isn´t happening?

Every plugin that is incorporating hooks and adding content in woo mails creates problems. The newest is germanized Pro. hidden link

I really do not want to start to go in circles again. I won´t

I´m asking for a concept, a workaround, a solution how to make it work for sure with wpml.

Thank you for any ideas and best regards
Holger

November 7, 2023 at 8:09 am #14744051

holgerD-8

Edit: I was wrong when saying that standard mails seem to work. When triggering Mails in BE by different users with different languages, still some strings in the emails are used in the wrong language. Still no logic when and why and in which email. Still no possibility to control this behavior, still wasting hours/days to try to figure out why and when this is happening.

FrontEnd (customer triggers the email) seems to work though ... in standard mails. IT SEEMS. With wpml you can´t never be sure.

November 7, 2023 at 11:10 am #14746531

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Holger.

I understand your frustration and sorry for any inconvenience.

You presented a similar case that, to your word, happens with Translatepress. WPML and Translatepress work in very different ways, and it would be wrong to decipher anything from the link to the ticket you sent us.

You asked:

How to make sure woo/wpml is checking the meta-field "wpml_language" in the order before sending any email in regards to this order. Whatever language setup your page has, whatever user language your user is set to, from wherever FE/BE the sending of the mail is triggered .... it shouldn´t matter! Why this isn´t happening?

I can't answer this question unless we can find a way to replicate the problem.

We have the following open known issues with WooCommerce emails. These issues are all with third-party WooCommerce extensions.

https://wpml.org/errata/customer-reviews-for-woocommerce-email-translation-issues-with-domain-per-language-setting/

https://wpml.org/errata/woocommerce-bookings-automatewoo-multiple-confirmation-emails-sent-when-using-3d-secure-payment/

https://wpml.org/errata/woocommerce-follow-up-emails-sends-multiple-follow-up-emails/

https://wpml.org/errata/woocommerce-checkout-field-editor-field-options-do-not-translate-on-order-confirmation-page-or-emails/

I'm sharing these links for you to check if any of the above issues might be what you are facing on your sites.

Also, I noticed that WPML Multilingual CMS (our core plugin) is not updated to the latest version on your site. Please update WPML to its latest version, 4.6.7, and check if the problem persists. I understand that the problem on your site happens randomly. However, it is important always to check things with the latest versions of our plugins.

To get forward and help you with this issue, we must be able to replicate the problem. It can be done in two ways.

A. Replicating the problem on a fresh WordPress installation. We need to replicate this issue on a fresh WordPress installation. For this, I created a test website with a clean WordPress install. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

If you can replicate the problem on the test site, it would be great. Then, tell us the steps to see the problem, and we will proceed from there.

B. Get access to your site and describe the steps to see the problem. For this, I'm enabling a private message for the following reply.
Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Regards,
Itamar.

November 8, 2023 at 1:11 pm #14756837

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for the access details.

In WooCommerce -> Settings -> Emails, you have 27 email formats. I assume that most of them are added with WooCommerce extensions. By default, WooCommerce has about 10 email templates. You wrote:

I did some germanized email tests with one/two emails (with translated strings) with the described problems. Anyways you´ll see the problem when playing around with emails. I would suggest to primarily trigger mails from the BE to get "quick results" and changing the language of your Admin user once in a while when do so...

I'm unfamiliar with the Germanized plugin. I need a clearer description of how to replicate the problem, please. Please tell me which email template to check. Please tell me in the following manner: Do 1. 2. 3. and so on.

I also need your permission to install an email logger plugin like this: https://wordpress.org/plugins/email-log/. This is required for me to "catch" and see the emails.

Thanks,
Itamar.

November 8, 2023 at 5:02 pm #14759559

holgerD-8

Hi, yes, you can install plugins.

I´m out of office until sunday. I´ll get back to you with further descriptions upcoming week. Anyways, if you want to keep going you can send standard woomails from the backend in orders with different admin-languages and profile-languages. There already the problems should show themself.

EDIT: i was just thinking ... as i wrote, there is no logic to the problems. So i can´t write you a manual what to do in which sequence. Just try to send emails from the BE for different states of orders with different admin-langs, user-langs. You will quite quickly run into translation problems.

I was trying once with wpml support to define the problems. It became a 4 pages thread with no solution but realization of the problems. It´s an ongoing problem for many wpml users. Thats why i was asking for a solution or workaround.

November 9, 2023 at 2:30 pm #14768295

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

OK, I'll try to replicate the problem on your site. But I need further permission from you.

1. Confirm that you understand that email will be sent to your clients by triggering WooCommerce emails from existing orders.

2. Update WordPress to its latest version - 6.4.1

3. Update WooCommerce and WPML and its add-ons to their latest versions.

4. Switch the theme to a default WordPress theme and deactivate the third-party plugins (plugins that are not related to this issue).

Regards,
Itamar.

November 14, 2023 at 9:24 am #14795419

holgerD-8

Hi Itamar,

1) all customers and orders for real customers are deleted on the staging site. There shouldn´t be a problem

2) I will. But can´t on the live site at the moment because WP introduced some crazy css issues in 6.3 that would recommend a complete redesign of the live site. Also >6.3 will not solve the issue

3) I did. Also on the live site. That didn´t fix the issue

4) where is the sense in switching to the default theme and switch off all needed plugins? I won´t on the live site. Most of the plugins and at least all plugins that might be related to the issue are defined 100% wpml compatible by onthegosystems. Also the theme. Anyways i will do as you asked.

5) please be aware that the footer is a copy of email-footer.php in the child theme. Working when triggered in FE, working sometimes (depending on the email) in BE. I think that has nothing to do with the issue itself.

November 15, 2023 at 7:54 am #14804971

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks!

I'm still trying to understand if I see the problem you are referring to. At first, I thought you meant that there is a mix of languages in one specific email. But now I see that when I trigger different emails for the same order, one is sent in German, and the other is sent in Italian. I tried it on order number 17267. I resent the "Resend new order notification" and "Send paid for order notification". Please see the video I recorded while trying this.

hidden link

Is this the problem you are referring to?

If it is not the problem you referred to, please take a video like I did and send it to me so I can understand the problem. You can use the LOOM service. They have free accounts.

hidden link

Thanks,
Itamar.

November 15, 2023 at 8:55 am #14805697

holgerD-8

Thank you!

- you are using the standard woo mails. In those SOMETIMES strings and primarily the footer (that is not active in the standard theme) are in the wrong language. Only when triggered from the BE.

- you have to change the language of your user to different languages in BE to get lucky and see wrong strings.

Please try:

- use the terratuscia child theme with our own footer
- change the language of the admin who is triggering the mails in BE
- send shipping mails (via germanized), not standard woo mails

i can´t create a video to show the problem. As explained, wrong strings are happening randomly. My initial question was what´s the logic behind this and how to solve it. All my suggestions above are just guesswork. It is happening more often when following those suggestions. I couldn´t find a logic yet.

Mainly it happens with strings from plugins which are adding their content in the mails. Sometimes the footer too (what generalizes the problem. Not only plugin strings). Germanized is a new install and described as "wpml compatible". Before i was (additionally) using "Kadence email designer" which is eliminated now. With this plugin the behavior of even woo-standard-mails were much more erratic. Kadence email designer is not marked as "wpml compatible" (the author is claiming wpml compatibility though) so i eliminated this plugin a few month ago.

I want to emphasize again that this is not a settings nor missing strings problem. It´s a general bug.

best
H.

November 16, 2023 at 10:31 am #14824313

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hello, H.

The Germanized for WooCommerce plugin is officially compatible with WPML and WooCommerce Multilingual & Multicurrency.

https://wpml.org/plugin/germanized-for-woocommerce/

We will need to check if there is a new issue with strings in emails that are not getting translated. I'm unfamiliar with the Germanized for WooCommerce plugin. Please explain to me how to send emails with this plugin.

You wrote:

you have to change the language of your user to different languages in BE to get lucky and see wrong strings.

On your site, I can see that German (DE) is the default language, and English (EN) and Italain (IT) are the second languages.

Can you please explain to me what you mean by BE?

You also mentioned that you have a custom email in your child theme and that the problem is in the footer of the email. And you asked:

My initial question was what´s the logic behind this and how to solve it.

You must ensure you are wrapping those strings with the correct GETTEXT function. You can read more about it in our guide at the following link.

https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

Regards,
Itamar.

November 16, 2023 at 11:03 am #14824683

holgerD-8

Good morning Itamar, please see below

Can you please explain to me what you mean by BE?

--- BackEnd, FE FrontEnd

You must ensure you are wrapping those strings with the correct GETTEXT function. You can read more about it in our guide at the following link.

--- I´m pretty sure they are. It works 80% of the time. As mentioned, the footer problem is just one of the strings that sometimes are not getting translated. Especially when trigger emails in BE. With different Admin-Languages. You should be able to check the footer under appeareance -> Theme File Editor -> Emails -> email-footer.php
It´s not a custom email. It´s a custom email footer for all emails. Thats one of the ways WP/WC wants you to customize your emails.

--- I think the general underlying problem is whatever file/email is used thats not 100% WP/WC "standard" creates the problems. Plugins that add content in standard woo-mails, a modified footer in your child theme, non standard woo-mails. Let´s say "external content". Let´s concentrate on emails triggered in BE.

We will need to check if there is a new issue with strings in emails that are not getting translated.

--- It´s a general issue. It would wonder me if germanized is the culprit. I had the same problems with every plugin (i tried 4), wpml compatible or not, that "interferes" with woo-emails.

--- i would suggest to let your second tier support check this thesis. Germanized is made by a pretty good programmer and i expect the code to be fine and wpml compatible. Let your programmers get into it as an example for the general problem. I can´t explain in detail how to trigger emails with germanized.

best
H.

November 16, 2023 at 11:21 am #14824885

holgerD-8

Ps. to get "good, quick wrong results" Kadence email designer is an even better way to go. A lot of users in the forum complaining about lacking wpml compatibility (including me).

https://wordpress.org/plugins/kadence-woocommerce-email-designer/

November 16, 2023 at 12:11 pm #14825741

holgerD-8

PPS Kadence is marked "wpml compatible" i just remembered.

https://wpml.org/plugin/kadence-woocommerce-email-designer/

Please let the programmers install Kadence on a sandbox with the main language different from EN, a DE or IT admin and let them have fun. They are going to go crazy 😉

holgerD-8 confirmed that the issue was resolved on 2023-11-16 19:53:06.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.