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 5 months, 1 week ago.
Assisted by: Long Nguyen.