Skip to content Skip to sidebar

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
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Asia/Yerevan (GMT+04:00)

This topic contains 3 replies, has 0 voices.

Last updated by Christopher Amirian 4 days, 7 hours ago.

Assisted by: Christopher Amirian.

Author Posts
August 6, 2025 at 2:37 pm

rowanS-4

Background of the issue:
I am trying to translate WooCommerce emails with custom text using WPML on my site hidden link.

Symptoms:
I lost connection to the chat and would like to reconnect to Wasaq.

Questions:
How can I translate WooCommerce emails with custom text using WPML?
How can I reconnect to Wasaq in the chat?

August 6, 2025 at 3:37 pm
August 6, 2025 at 3:38 pm #17300288

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPM Lsupport. Please get back to us when you manage to have the customized Email.

Thanks.

August 6, 2025 at 3:49 pm #17300340

rowanS-4

The issue of the mail not being sent, comes from that this shortcode creates an issue:

<p><?php printf( _e( 'Ready to get started?', 'woocommerce' ); ?></p>

The printf doesn't work properly.

I've changed it to:

<p><?php esc_html_e( 'Ready to get started?', 'woocommerce' ); ?></p>

To see if we can proceed. And this keeps the template working. I've managed to do an order in the system. And you can see both orders in the mail logger now.

For some reason, this shows that it works now actually. Hooray. There is one small translation bit in the english version that seems to be dutch.

The word on the english mail: "Besteloverzicht" should be 'Order summary'.

I think I can slowly proceed to reimplement the code and hopefully identify this way, where it goes wrong.

Does it matter if I choose printf of esc_html_e??

Screenshot 2025-08-06 at 17.47.05.png
Screenshot 2025-08-06 at 17.45.33.png
August 7, 2025 at 10:49 am #17302266

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Both PHP functions you have mentioned are ok to use. So I think it is ok if you use esc_html_e.

Also I suggest that you start over and move the base file to the child theme without any changes and test and make sure the email language is correct without any custom code.

If it is then you can start slowely add the custom codes.

But if it is not, then you need to check for the problems in WPML > String Translation. Try to make sure that you also check the "Also show trasnlations" checkbox in the search section and search for the string tthat is not ok.

If you find one and you see that the flag shown in string trasnlation is not corresponding with the actiual string, please do as follows:

https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

Thanks