In the order confirmation mail the text that says "free shipping" is in English while it should be in Dutch. This looks very weird and unprofessional when everything is in Dutch but then that one piece of text is English.
On my local WC test site there are multiple strings with the same text (screenshot). It is not always clear which string is being output when, and so you may need to provide translations for each occurrence of the string.
If you have already done that, can you share a screenshot of the relevant section of the String Translation page?
"On my local WC test site there are multiple strings with the same text (screenshot). It is not always clear which string is being output when, and so you may need to provide translations for each occurrence of the string."
-I already translated all strings that had English as default language (even though my site's default language is Dutch) that said Free shipping. It didn't do anything.
"If you have already done that, can you share a screenshot of the relevant section of the String Translation page?"
-I don't really know what I need to take a screenshot of. Can you explain?
I was looking for a screenshot similar to that I took, of String Translation when you have searched for the text "Free shipping".
It would probably be quicker if I could take a look at your site directly, if that's okay?
Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
Thanks for that. I've looked at your site and confirm that everything looks like it is set up and translated correctly.
So I'll need to do some work to try and understand why that text in particular is showing in English when the Dutch translation is available.
(It could be related to the original text being English but English not being the default language of the site, or that English is hidden, I'm not sure until I do some further testing.)
I'm actually off today and Monday, but wanted to let you know I haven't forgotten about this, and I'll work on it first thing when I'm back.
I have done testing on a clean test site where I have a similar set up as you, namely a non-English default language, where English is a secondary language, which is hidden.
But I don't experience the same problem as you, the translated text for "Free shipping" is shown in the email notices.
I would need to do some testing on your site, but this is a production server, are you able to provide a staging server for testing?
I'll set a private reply so that I can get credentials for that server, if possible.
I did some more testing myself and found the following:
1. I created a free test product (so that I wouldn't have to set it to paid status in wordpress first, so that the order confirmation would come without me having to set this status in wordpress admin first).
2. I went to place an order for that free test product (while not being in the WordPress admin panel)
3. In this case, the line of text was in Dutch (so no problems)
4. However, I then went to the WP admin, set the WPML language to English (and also French just to test it) and then resent the order confirmation. And only then the problem started. This also made me come to the conclusion that for my earlier test orders, the cause of the problem was the WPML language I was on in the WordPress dashboard (with my earlier orders, I didn't have a free product, so I'd need to go to WordPress dashboard to set the order to paid)
So the conclusion is that it is not a problem that would occur when customers place an order to my site, BUT, it does occur when customers ask me to resend the order confirmation and I happen to be on a different WPML language.
Do you have any idea what is causing this and how to stop it? It shouldn't happen that this line of text changes language if I am on a different WPML language in the wordpress dashboard. The rest of the text in the email doesn't change after all.
OK, now that sounds a lot like another thread I have been dealing with recently, which is known and is on our development board to produce a solution, though it may be a little while before they get to this particular issue.
The language displayed is affected by the language being used in the back end at the time.
Knowing that, if it is possible for you to switch to the appropriate language before re-sending the order confirmation, you may want to do that in the meantime.
Otherwise you can apply this workaround.
It requires editing the file wp-content/plugins/woocommerce-multilingual/inc/class-wcml-orders.php.
Around line 131 you should see the function adjust_order_item_in_language declared.
Immediately after, add a line with "return;", as shown here:
public function adjust_order_item_in_language( $items, $language_to_filter = false ) {
return; // workaround for issue wcml-4186
if ( ! $language_to_filter ) {
$language_to_filter = $this->sitepress->get_current_language();
}
Do you want to check and verify it works?
(The other thread was related, but referred to the order payments page rather than an email order notification, but it appears to be the same issue.)
You will enter the wp-content folder, then the plugins folder, then woocommerce-multilingual folder, inc folder and finally edit the class-wcml-order.php file and add the code Nigel mentioned.
Thank you.
The topic ‘[Closed] Line of English text in order confirmation mail while ordered on Dutch site’ is closed to new replies.