WooCommerce Email Language Locker
Woocomemrce emails language plugin.
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/neevalex/woo-email-language-locker/archive/refs/heads/main.zipForces WooCommerce emails to use the language that was active when the order was created.
Supports:
- WordPress\Woocommerce default locale switching
- TranslatePress language capture/switching (best effort based on available TranslatePress functions/hooks)
Not tested with WPML
Also includes an admin panel with logs of the last 100 WooCommerce emails:
- Email title
- Recipient
- Language
- Order ID
- WooCommerce Email ID
- Timestamp
Install
- Copy the
woo-email-language-lockerfolder into your WordPresswp-content/pluginsdirectory. - Activate WooCommerce Email Language Locker from the Plugins page.
- Ensure WooCommerce is active.
Where To Find Logs
In wp-admin, go to:
WooCommerce -> Email Language Logs
Settings
In wp-admin, go to:
WooCommerce -> Settings -> Emails -> Email Language Locker
Available setting:
- Enable Email Logging (on/off)
How It Works
- On checkout/order creation, the plugin stores:
- Current WordPress locale
- Current TranslatePress language (when available)
- During WooCommerce email generation, the plugin switches language context to that saved order language.
- It restores the previous language context after rendering.
- It logs each rendered WooCommerce email entry (up to last 100 entries).
Notes
- If an email is not order-based, language forcing is skipped for that email.
- TranslatePress support is implemented defensively because different versions/installations may expose slightly different language APIs.