Plugin Woocommerce: Translate all email sent to customers
Version 3.1.7 of the Weglot WordPress plugin introduces a new feature that allows you to translate all Woocommerce emails related to an order sent to customers.
When an order is created, the language of the user is then recorded in the meta data of the order concerned (the language is not saved if the order is created from the original language of the site). When a Woocommerce email is then sent to a customer and it concerns an order, this email will then be translated if the order is linked to a language.
To work, you must also have activated the 'translate mail' option in the Weglot plugin options page.
This feature is disabled by default in this version. Here are 2 methods to activate this feature.
Method 1: Custom Plugin
To activate this feature, you can create PHP file named "weglot-wooccommerce-translate-following-mail.php" in your plugins directory (wp-content/plugins/) with this content :
* Plugin Name: Weglot - Wooccommerce translate following mail
* Plugin URI: weglot.com
* Description: Use weglot to translate all Woocommerce emails related to an order sent to customers.