This thread is resolved. Here is a description of the problem and solution.
Problem:
Email strings are mixed when the WooCommerce Order Proposal plugin is active
Solution:
The client reported that the problem came from the third-party plugin WooCommerce Order Proposal. He contacted their support, and this is their reply.
I was also in touch with WP Overnight support (authors 'WooCommerce Order Proposal'). It turned out that the plugin was doing something wrong regarding WPML. The response from support: 'We were reloading textdomains on wpml_language_has_switched hook but also on change_locale, but apparently we don't need to do it on the first.'
I got a modified version of the plugin and this solved the problem. So this ticket can be closed.
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.
Tagged: Bug, Compatibility, WCML
Related documentation:
This topic contains 18 replies, has 2 voices.
Last updated by Itamar 1 year, 4 months ago.
Assisted by: Itamar.
Author | Posts |
---|---|
January 16, 2024 at 8:27 am | |
mickS-3 |
Hello, please check: hidden link |
January 16, 2024 at 8:54 am | |
January 16, 2024 at 8:56 am #15188417 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, This ticket has been inactive for quite a while. I didn't get a reply from you. So, I've transformed this chat into a support ticket because you may still need help from us. If you do, please reply to this ticket, and one of our supporters will continue helping you. If you need more help, please let us know if you updated WooCommerce Multilingual & Multicurrency to its latest version and if you checked the developers' guides I sent you. Regards, |
January 16, 2024 at 9:20 am #15188532 | |
mickS-3 |
As discussed in the chat, you will investigate the problem further. Would love to hear as soon as you guys have an update. |
January 16, 2024 at 9:22 am #15188549 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Thanks for confirming you updated WooCommerce Multilingual & Multicurrency and checked our developers' guides. You confirmed it in another chat here: https://wpml.org/forums/topic/wpml-chat-support-ticket-by-micks-3-1705395388/ I suspect that there is a collision with the theme or another plugin that might cause this problem. If possible, get your site into a minimum environment. Minimum environment means switching to a default WordPress theme like TwentyTwenty-One and no plugins activated except WPML. First, you will need to check if the problem persists when just the theme is switched to TwentyTwenty-One (for example). If it persists, then deactivate all plugins except the WPML, its add-ons, and WooCommerce itself (without its extensions). Then please check if the problem persists. If it does not persist, start by activating the plugins one by one and check when the problem comes back, then report to me which was the culprit plugin. |
January 16, 2024 at 3:27 pm #15190934 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I suspect the email strings you showed us in Strings Translation as translated are not strings from your WooCommerce email templates (although the text is the same.) Please go to WPML -> Theme and plugin localization, scan the theme (probably the child theme - Batko Theme Child), and then check if those strings appear in Strings Translation. If they appear after the scan, delete the old email strings and translate the new ones. Then check again. Regards, |
January 16, 2024 at 3:55 pm #15191053 | |
mickS-3 |
Hi, Please check this:hidden link Is it possible that you investigate this further? You have my permission to deactivate plugins, themes and so on since it's a staging website. So you can test it yourself. Kind regards, |
January 16, 2024 at 6:34 pm #15191785 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Mick. Thanks for the video. It is unclear if you proceeded with the suggestions I gave you in my previous reply. Please proceed as follows. 1. Update WooCommerce to its latest version. 2. Switch the theme to a default WordPress theme. (You can use Twenty Twenty-Four, installed on your site.) 3. Deactivate all the third-party plugins. You should leave active only WPML, Strings Translation, WooCommerce Multilingual & Multicurrency, and WooCommerce (without any of its extensions.) 4. Go to WPML -> Theme and plugin localization, and scan WooCommerce for strings. 5. Go to WPML -> Strings Translation, and check for the new email strings. 6. Delete the older strings if the same string is showing twice. Default strings from WooCommerce will have the domain 'wooCommerce', and strings that you customized will have the domain like this: 'admin_texts_woocommerce_customer_processing_order_settings'. 7. Translate the email strings. 8. Check if the problem persists. To help you we need your cooperation with this. I'm sorry, but we can't do it for you, even if it is a staging site. Please let me know what you have found. Regards, |
January 17, 2024 at 9:18 am #15193594 | |
mickS-3 |
Hi Itamar, Thanks for your patience. I think I've found the problem. It's caused by the plugin: WooCommerce Order Proposal by WP Overnight Extra information: hidden link The plugin should be compatible with WPML: hidden link Regarding the strings: I think it's correct when the strings from the child theme show 'woocommerce' since this is the text domain I've added in the php file. How to proceed? Greetings, |
January 17, 2024 at 2:16 pm #15195339 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Mick. Thanks for finding the Colprit plugin. The WooCommerce Order Proposal plugin is unknown to us and not officially compatible with WPML. It is not on our list here https://wpml.org/plugin/. We need to replicate this issue on a fresh WordPress installation. Then, if needed, I'll be able to escalate it to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link: hidden link With this link, you'll be directly logged in. Could you please install the WooCommerce Order Proposal plugin and see if the issue is replicable on a clean WordPress installation? I already configured WPML and WooCommerce on the sandbox site (English is the default language, and Dutch is the second language. The Storefront theme is installed with demo products). Please also ensure you install the latest version of the plugin. Please let us know when everything is finished, and you can replicate the problem. Since the authors of the WooCommerce Order Proposal state that the plugin is compatible with WPML, please consider also contacting them about this issue. It would be great if you could urge them to join our Go Global Program. You can find details about it here. https://wpml.org/documentation/theme-compatibility/go-global-program/ We will be happy to cooperate with the authors in making their plugin officially compatible with WPML. Regards, |
January 17, 2024 at 6:08 pm #15196490 | |
mickS-3 |
Hi, I tested a few things again: So something seems to be going wrong in my setup. However, I have no idea what could be causing it. I also created a ticket with WP Overnight and mentioned this ticket so they can check. How to proceed? Regards, |
January 17, 2024 at 6:34 pm #15196545 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Mick. Thanks for reporting your findings. Please try the troubleshooting section. 1. Take a backup of your site's DB. 2. Go to WPML -> Support -> Troubleshooting (link) 3. Once on the troubleshooting screen, press the following buttons and check if it helps. Press each button at a time and wait for the process to complete. - 'Clear language information and repopulate languages' button (if it is showing) - 'Clear the cache in WPML' - 'Remove ghost entries from the translation tables' - 'Fix element_type collation' - 'Fix WPML tables collation' - 'Assign translation status to duplicated content' - 'Set language information' - 'Reset languages' Press this button only if you didn't add a custom language! - 'Fix post type assignment for translations' - 'Cleanup and optimize string tables' - Clear invalid strings *** Please make a backup of your database before using this.*** Thanks, |
January 18, 2024 at 8:05 am #15198339 | |
mickS-3 |
Hi Itamar, I performed all the troubleshooting actions you indicated. I did a test after each action so I know what the solution would be. Unfortunately, none of the actions solved the problem. I did another test after performing all the troubleshouting actions as a reference where I disabled the plugin 'order proposal'. Then everything worked properly again. There is also no DB caching activated to my staging website, so there can't be a problem here either. How do we proceed? Regards, |
January 18, 2024 at 9:28 am #15198858 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, and thanks for trying my suggestions. I need to discuss this issue with our second-tier supporters. But before that, I need some more details, please. We need to know with which email types and email strings this problem happens. Can you please specify the email types (for example, New Order, Processing Order, etc.), and also which strings (for example, Email heading, Additional content, etc.)? Thanks, |
January 18, 2024 at 9:51 am #15198999 | |
mickS-3 |
Hi Ikram, Currently, a default theme is active so there are no custom strings. The problem occurs with all email notifications. The subject, header and additional information are always translated properly in the staging. The body text, the table with products and address details are not translated properly. On the live website, the subject and header is always translated properly. The body text rarely translated correctly. The table sometimes translated correctly. The address details sometimes translated correctly. An example is the on-hold email, this string: 'Thanks for your order. It's on-hold until we confirm that payment has been received.' I translated this line to 'NL Test' for testing purposes. However, this does not work. As soon as I deactivate the 'WooCommerce Order Proposal' plugin, everything works properly. Another example is the processing email where I haven't translated any strings and WPML shows the default translation. With the plugin deactivated, everything works properly. With the plugin active, again the first piece of text, product table and address details are in the default language. As soon as I deactivate the 'WooCommerce Order Proposal' plugin, everything works properly. I think if the problem is solved for one string, it is solved for all strings. This is because the problem does not occur for a specific string but for all strings in the notification emails. You have access to the website so you can test yourself. You can also go here to Post SMTP --> Email log so that emails can be analysed. From page 3 in the log, you will see emails on the live website. Regards, |