Skip Navigation

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

Problem:
The client is developing a site using WPML with WooCommerce in English and German. While most parts of the WooCommerce emails translate correctly, specific sections like bank details and order information in the on-hold email remain in English.
Solution:
First, ensure you are using the latest version of the WooCommerce plugin. Follow the documentation on translating WooCommerce emails here: https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce-emails/
If the issue persists, add the following code to the

functions.php

file in your theme folder:

add_filter('woocommerce_email_heading_customer_on_hold_order', 'load_woocommerce_textdomain', 5, 2);

function load_woocommerce_textdomain($heading, $email) {
load_plugin_textdomain('woocommerce', false, plugin_basename(dirname(__FILE__)) . '/languages/');
return $heading;
}

Please ensure to back up your database and website before making changes.

If this solution does not resolve the issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket with us for further assistance.

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 4 replies, has 2 voices.

Last updated by Long Nguyen 3 months, 2 weeks ago.

Assisted by: Long Nguyen.

Author Posts
May 30, 2024 at 11:23 am #15687554

kamenB-2

Background of the issue:
I am developing a site using WPML with WooCommerce, and it supports two languages: English and German. I am trying to ensure that all aspects of the WooCommerce emails are correctly translated into German.

Symptoms:
When I create a new order in German, the order on-hold email has a translated subject, email heading, and additional content. However, parts of the email such as bank details and order information remain in English. Other emails are translated correctly.

Questions:
How can I ensure that all parts of the WooCommerce emails, including bank details and order information, are translated into German?
Is there a specific setting or configuration in WPML that I need to adjust to fully translate WooCommerce emails?

May 31, 2024 at 3:40 am #15690484

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Kamen,

I'm discussing this issue with our 2nd tier support and I will update you here when I have something to share.

Thank you.

June 7, 2024 at 10:00 am #15714656

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I got a workaround from our 2nd tier support to translate the on-hold email heading. Please add the code below to the file functions.php in the theme folder

add_filter('woocommerce_email_heading_customer_on_hold_order', 'load_woocommerce_textdomain', 5, 2);

function load_woocommerce_textdomain($heading, $email) {
	load_plugin_textdomain('woocommerce', false, plugin_basename(dirname(__FILE__)) . '/languages/');
	return $heading;
}

❌ IMPORTANT: Please backup your database and website before proceeding ❌

Let me know how it goes.

June 10, 2024 at 12:46 pm #15722052
kamenB-2

Hello!

Thanks! The main part of the email has been translated.
We additionally use woocommerce-subscriptions, but this table is not translated yet. I scanned woocommerce-subscription in "Theme and plugins localizations" and I see the strings in "String Translations" and they are translated, but in the mail there are still on English.
I tested for "order on hold" and "completed order". And on the both places the table it's not translated.
Can you help me with that or is necessary to open new ticket?

Thanks in advance!

New threads created by Long Nguyen and linked to this one are listed below:

https://wpml.org/forums/topic/woocommerce-subscriptions-email-table-is-not-translated/

Screenshot 2024-06-10 153410.png
June 11, 2024 at 1:19 am #15724256

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

It could be a compatibility issue between WooCommerce Subscriptions and WPML, and it is a separate issue. I will split this into a new ticket for better handling.
If you see the main issue of this ticket with the on-hold email heading translation is resolved, please mark it as Resolved.

Thanks.

kamenB-2 confirmed that the issue was resolved on 2024-06-11 08:29:44.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.