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 16 replies, has 3 voices.
Last updated by Alejandro 3 years, 10 months ago.
Assisted by: Alejandro.
Author | Posts |
---|---|
September 6, 2021 at 2:32 pm #9532453 | |
Florian |
We have WPML installed into our woocommerce website. It has woocommerce and WC-Subscriptions plugins, with woocommerce multilingual enabled with status everything okay. The webiste has two languages English and German, the default language is German. During WPML installation, its default language was English, we changed its default language later, after installing WPML. The user subscribed to a subscription with German language, all emails including order received and order completed sent in German. Great! Now an admin of the website (with his admin area language in English) add a renewal order to this user's subscription (or a renewal order added to this subscription by running wp-cron "Scheduled Actions"): 1. When the admin change the status of this renewal order to "Processing", the user receive the "Renewal Order Rceipt" email in English. 2. When the admin change the status of this renewal order to "Completed", the user receive the "Order completed" email in mixed content as the subject of the email and header in email body is in English language, the rest of the email is in German. If the website admin change his language to German, the same above user, gets both emails in German. The content of the email is checked, they are fully translated from English to German. According to the WPML support representative's request, I was able to reproduce this issue in bellow test environment: - Only WPML (WooCommerce Multilingual, WPML Multilingual CMS, WPML String Translation, WPML Translation Management) with WooCommerce and WooCommerce Subscriptions plugins are installed and activated. - Theme is set to a WordPress default "Twenty Nineteen" - A simple subscription product is added to the woocommerce and a user in German language signed up for it. |
September 7, 2021 at 2:25 am #9535437 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Hello Thank you for taking the time to setup an example of this issue. I would like to "simplify" the description of the problem as follows: <<. Emails generated from "Edit Subscription" screen use the Admin language of the user instead of the Order language (wpml_language) >> Do you agree with the statement? Steps to generate the problem : 1. Create a DE order with the product provided : Test Product DE If you agree, I will now send a copy of this site to our compatibility team. |
September 7, 2021 at 7:35 am #9536741 | |
Florian |
Hello Yvette! A. One additional step between step 4 and step 5 is required to invoke sending the second email of the same order to the customer, the step is as bellow: 4.2: Now go to the Woocommerrce > Orders and click on the id hyperlink of the recently created renewal order (created in step 4), in the order edit screen, change the status of the order to "Completed" and click update. B. For your step 5 (the email which are okay are generated from Woocommerce ORDER screen, not the Woocommerce EDIT screen) and the renewal order was not included, so you need to change the sentence as bellow: 5. Check resulting email log and you will see that the emails generated from Woocommerce customer order screen are in correct language of order, but the emails generated from the Subscription edit screens and Renewal order edit screen are not. I also added a screenshot, in which I pointed to both emails. |
September 7, 2021 at 5:45 pm #9542421 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Great - noted and thank you for the edits. I will now prepare the escalated internal ticket. |
September 8, 2021 at 2:09 am #9543909 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
This issue is now escalated to our compatibility team for more work. |
September 13, 2021 at 6:47 am #9573719 | |
Florian |
Hello, Thank you! |
September 13, 2021 at 8:13 pm #9579283 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
Hello Thank you for writing in. Yes, I have feedback. In order to send this email in the order language, please apply following code modifications. Modify this file /woocommerce-subscriptions/includes/emails/class-wcs-email-processing-renewal-order.php: line 74 Add this code: if (class_exists('sitepress')) { do_action('wpml_switch_language', get_post_meta($order_id, 'wpml_language')[0]); } Just below this line: function trigger($order_id, $order = null) { ADDITIONALLY - Go to WooCommerce > Settings > Emails > Processing Renewal order. Please let me know if these changes work for you or if you need help to apply them. |
September 14, 2021 at 7:22 am #9581059 | |
Florian |
Hello, If you do the testing with a subscription in DE language instead of EN would be better, as in English, the base text is also in EN, so you can not see the issue. |
September 14, 2021 at 8:49 am #9582105 | |
Florian |
I will appreciate if I have someone assigned to this ticket whose timezone is near to Europe. Unfortunately, your and my timezone are totally opposite to each other, we are starting with night, while you are starting to answer the ticket, then you need to wait 24 hours to get a reply and same to me. This causes more delay for interaction and feedbacks. I would like to get this issue resolved ASAP! Thanks for your understanding. |
September 14, 2021 at 6:08 pm #9586373 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+02:00) |
I´ve confirmed that this is not fixed. I wiil also see if I can find someone to transfer the followup of this ticket to. |
September 15, 2021 at 7:56 am #9589745 | |
Alejandro WPML Supporter since 02/2018
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
I suspect the problem is a bit different now. please take a look at this: hidden link you'll see that almost the entirety of the mail is in German as it should be except 2 strings. i'm testing to see what is going on. By the way, i'll follow your case from now on since i'm in Europe and can probably answer faster. |
September 15, 2021 at 8:18 am #9589917 | |
Alejandro WPML Supporter since 02/2018
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
Our developers are looking into this, can you confirm that in this last mail, only those strings are the only things that are missing its translations? the rest seems ok. |
September 15, 2021 at 9:40 am #9590821 | |
Florian |
Hello Alejandro, So, regarding your concern: If I revert back the requested code change, it goes back to the first stage of this ticket. So, it means with this code change you found the problem and are near to get a solution soon. Thanks |
September 15, 2021 at 10:23 am #9591389 | |
Alejandro WPML Supporter since 02/2018
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
So, in the sandbox site the header is not translated because it doesn't really have any header set in WPML > Settings > Mails. - Set one and you'll find it for translation in WPML > String Translation - The rest of the fields were deceiving because they had the same text as the original strings but the ones you translated were not the correct ones. please add something unique to the texts from the mail and then follow this guide https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#strings-arent-selected-for-translation this will allow you to find them easier and then register + translate them. that should do it. you can test it in the sandbox site ( i forgot to translate the footer but the rest was translated using the method above and it all worked). Regards. |
September 15, 2021 at 11:44 am #9592261 | |
Florian |
Hello, But still unable to find it in string translation, I don't know what I am missing? I am doing as bellow: After this, I went to WC > Settings > Emails > Processing Renewal order, added unique text to the "Subject" and clicked "Save changes". Then I went back to WPML > ST and now searched for the unique strings I added above, nothing to find to translate. |