Open
Reported for: WPML String Translation 3.2.18
Overview of the issue
Emails sent to customers after updating the status of an order in the back end may include texts in mixed languages, even when the relevant strings have been correctly translated.
(This can occur when the admin user updating the order has a particular language set in their user profile which is different than the language the customer placed the order in.)
Workaround
As a temporary workaround you can edit the String Translation file wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php
Be sure to have a current backup before making any changes.
Locate the definition of the private function loadTextDomain and update it like so:
private function loadTextDomain( $domain, $locale ) { if ( ! isset( $GLOBALS['l10n'][ $domain ] ) && ! isset( $GLOBALS['l10n_unloaded'][ $domain ] ) && ! isset( self::$loadedDomains[ $locale ][ $domain ] ) ) { load_textdomain( $domain, $this->fileManager->getFilepath( $domain, $locale ), $locale ); self::$loadedDomains[ $locale ][ $domain ] = true; } }