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 13 replies, has 2 voices.
Last updated by Yvette 1 year, 8 months ago.
Assisted by: Yvette.
Author | Posts |
---|---|
August 22, 2022 at 9:06 pm #11907917 | |
Santiago |
Hello there, I think I discover a big problem with WPML and the WooCommerce customer email notifications. I can create an order in some additional language, like German (DE) and the customer receives the email in the right language with the right texts. Then is not work anymore in the right language when I change the order status on WooCommerce. Can you setup a sandbox WP installation to show all this? Thank you in advance.- |
August 23, 2022 at 10:26 am #11911105 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Hello Here is the sandbox site you requested: Please replicate the issue there and then write back with steps I need to execute to see it myself. |
August 23, 2022 at 11:12 am #11911575 | |
Santiago |
Hello Yvette and thank you for your update! I have created a video to share the problem. 1.- For new orders add the right code on the header, which is = lang="de-DE" 2.- And additional actions like changing the order status, etc. don't. I share both steps in the video. Some idea about why this is happening? Thank you in advance.- |
August 23, 2022 at 11:42 am #11911747 | |
Santiago |
An additional detail. |
August 23, 2022 at 11:57 am #11912017 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Hello Part of the issue is that Woocommerce plugin was not scanned so some of the template strings were not available for translation. Vid: hidden link However, even with this, the body is still not translating and this I can escalate as a bug. Did you notice this on other emails - I can confirm it happens with order-completed - but is there another one that you have noticed and can recreate on sandbox? |
August 23, 2022 at 12:06 pm #11912089 | |
Santiago |
Hello there, 1.- I do copy all the .PO files to every possible location, 2.- Also, I manually add all the translations via WPML string translation, I do all this on different empty & clean WP installations. Do you have some idea about some temporal solution? |
August 23, 2022 at 4:03 pm #11914347 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
This issue has been escalated to our compatibility team for more work and a workaround. Please be patient while I wait for a response from them |
August 23, 2022 at 4:57 pm #11914845 | |
Santiago |
Also, I have tested different plugins and had the same problems with every plugin. |
August 26, 2022 at 1:14 pm #11937705 | |
Santiago |
Hello there, I also have a conversation with the Kadence plugin support team and here is the last message from them: *** Kadence WP Support <help@kadencewp.com> Hi! I asked our developer and here is what he said: "I’ve heard of Woocommerce/WPML struggling with correct language when the admin is triggering the event because they focus on current user language. However, this was supposed to be fixed with WPML's WooCommerce integration. I’m running some tests but note that the language in the code of the email will always be based on the current user that triggers the email, you can turn off our plugin and that will still be the case. WPML was supposed to add a filter to change out the text based on the order and which language the order was made but it won’t set the language it just means it will filter the strings. which is likely where the issue is, in that WPML isn’t looking at Kadence strings." "Because, without your plugin, the WooCommerce default email design works perfectly..." Here's a screen recording for your reference - hidden link. As you have seen, the Thai language was used correctly for the emails on actual orders but when I change the order status, my site language(English) was used. I hope this gives you more information. Let us know if we can assist you further. Kind Regards, |
August 29, 2022 at 8:33 am #11947205 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Hello Please verify that the following code added to the functions.php file has resolved the issue on this sandbox: Code: $option_key = 'kt_woomail'; add_filter( 'option_' . $option_key, [ wpml_st_load_admin_texts(), 'icl_st_translate_admin_string' ] ); |
August 29, 2022 at 3:35 pm #11951097 | |
Santiago |
Thank you again for your help, |
August 29, 2022 at 6:21 pm #11952409 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Is the copyright appearing in the email? or somewhere else? |
August 29, 2022 at 6:23 pm #11952415 | |
Santiago |
Yes. On the emails footer. |
August 29, 2022 at 6:29 pm #11952551 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
OK. Snippet changed as follows. $option_key = 'kt_woomail'; add_filter( 'option_' . $option_key, [ wpml_st_load_admin_texts(), 'icl_st_translate_admin_string' ] ); $option_key = 'woocommerce_email_footer_text'; add_filter( 'option_' . $option_key, [ wpml_st_load_admin_texts(), 'icl_st_translate_admin_string' ] ); This is following the instructions as described in this errata: |