Home›Support›English Support›[Resolved] translations not showing in woocommerce "Customer completed order" email
[Resolved] translations not showing in woocommerce "Customer completed order" email
This thread is resolved. Here is a description of the problem and solution.
Problem:
This client mentioned that his WooCommerce emails weren't translated even if followed our documentation.
Solution:
In fact the client translated correctly the emails, and they were working correctly too. So no issue here.
But he was using a preview plugin and in order to see the preview in the secondary language, you need to switch your profile language first.
"The preview email plugin that you're using base the preview on your profile language. If my profile is set to English I'll see the English version of the email. However if I switch my profile to Croatian, I will get the Croatian preview."
Welcome to the WPML support forum. From the screenshot shared, I don't think you're translating the right string. I can see that the textdomain is "woocommerce".
I did a quick test on my end and the textdomain for the completed order email should be "admin_texts_woocommerce_customer_completed_order_settings".
In short:
- Go to to "WooCommerce > Settings > Emails"
- Click "Manage" for the right email (Completed Order)
- Set your English texts and click "Save"
- Then click on the "translations" link to translate all strings related to that particular email
---
Last, i don't think it's related to your issue but please update WPML and WooCommerce Multilingual (WCML) to the latest version. You can download all our plugins directly from your WPML account.
- Go to https://wpml.org/account/downloads/
- Click on "Download WPML manually" to see all plugins and download them
- In your WP dashboard, go to "Plugins > Add new" and use the button at the top of your screen to upload the .zip file
WCML 5.3 comes with great improvements and bug fixes
Thanks for the clarification, the string is coming from the template itself. In the documentation I shared, did you try to follow: Translating Custom-Coded WooCommerce Emails?
no I did not since I'm not using custom woocommerce emails, and would like to avoid that.
I looked at tutorials, and first part that talks about defauld WC emails, that is how i already set up translation, wpml string translation is finding string, and it is translated, but translation is not shown on emails.
If you dont have any other solution, I'll try to make staging site at Monday the latest, and test update plugins to newest wersion, and we can continue finding solution for this problem then, If not solved by update 🙂
The section "Translating Custom-Coded WooCommerce Emails" from the documentation explain how to scan your theme (where the custom PHP template is) to get the strings registered in String Translation.
Sure, I can have a look on your staging site, please provide me with an addmin account. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.
IMPORTANT: Before we proceed, please backup your site and database.
Thanks for the access. It was easier to understand.
- First, you were right, the email template doesn't exist in your theme so the default WooCommerce one was used.
- Your translations were done already
- I did a test purchase in the default language Croatian (Bank transfer)
- I installed and activated the plugin "WP Mail catcher". This plugin will keep a copy of all emails sent by the website
- In WooCommerce I changed the order status from "On hold" to "Completed" which triggered the email to be sent
- I checked in WP Mail catcher and I can confirm that the email is translated (see screenshot)
I ordered in HR and received the email in HR
The preview email plugin that you're using base the preview on your profile language. If my profile is set to English I'll see the English version of the email. However if I switch my profile to Croatian, I will get the right preview (see screenshot)
So it seems that the issue is resolved to me. If I misunderstood the issue, could you please give me more details and clear step by step to reproduce.
Thank you, I tested mails and got same results, also made one order as a guest from Croatian page, and all is ok 🙂
So it seams that everything was ok all the time, just a confusion with user language 🙂