-
Notifications
You must be signed in to change notification settings - Fork 19
woo emails don't work #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I too was having some issues with getting Woocommerce to send order confirmation emails in the right language. But I got it working, and wanted to share my findings... I found that a few things need to be checked - or they could interfer with woocommerce order-confirmation email languages:
|
Unfortunately the issue is still present a not solved. It seems that if there is further processing of an item - within WooCommerce-, then admin language is inherited and not the stored user language. |
The problem is not Qtranslate-X rather WooCommerce. As you want the Woo to send messages in the order language, maybe different than your admin language. Setting WP language on the fly is not easy. Naturally setlocale(LC_ALL, ) does not work - has no effect, as changing the local via add_filter. Maybe switch_to_locale( $locale ) changes also this, but haven't upgraded to that so far. Found a bush fix / ugly, works. The trick is to use the filters provided earlier, unload WooCommerce's textdomain and force WooCommerce to load the .mo files with load_textdomain(). Naturally you need to create a .mo files for English as well. |
Guys, sorry to be the bad guy - again. Anyway I need to report you that woo emails are not working with woocommerce-qtranslate-x.
Here is the database entry for the order
as you can see it is English. The communication for the same order is fully Hungarian though
The only exception is the 3rd email that I send separate (even from a separate address). That also uses _user_language entry of the database, sets q_config language to that and uses qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage()
Naturally the English strings are also in WooCommerce, but does not use.
WP 4.2.4
Woo 2.3.13
Woo & qTx 1.3
qTx 3.4.6.4
The text was updated successfully, but these errors were encountered: