Support » Plugin: Weglot Translate - Translate your WordPress website and go multilingual » WooCommerce order emails are not translated except the very first email

  • Resolved miikewordpress

    (@miikewordpress)


    Dear Developer,

    I’ve been trying to use WeGlot on my WooCommerce store since early 2018 but some bugs such as ‘Redirect URL on checkout WooCommerce’ prevented me from using it. I re-installed WeGlot last month and was excited to see a lot of improvement and bug fixes.
    However I believe there’s still one crucial thing that needs some attention for this plugin to be fully compatible with WooCommerce.

    Issue: WeGlot plugin does not translate emails in customers’ preferred language except the very first email they receive when they land on thankyou page.

    Steps to Reproduce:
    1. A customer purchase an item on WooCommerce store and land on /order-received/ page
    2. WooCommerce order notification email (Processing Email) will be sent to the customer in chosen language
    3. An admin changes the status of the order to ‘Completed’ after shipping the product
    4. WooCommerce order delivery conformation email (Completed Email) will be sent to the customer in store’s default language
    (Remarks: If an order has on-hold status, then the customer will receive on-hold email in their chosen language and will receive processing, completed emails in store’s default language)

    Suggestions:
    I think information of the selected language needs be stored with each order so that subsequent emails can be sent in correct languages for both logged-in users and guest checkouts.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Hello @miikewordpress,

    Thank you for your Suggestion.
    In a first time, you can solve this with a parameter in the URL : wg_language

    When you are in your WordPress back office, before changes the status of the order to ‘Completed’, you can add a parameter wg_language in the URL to specify a language.

    For example, if you want to send an email translated in French, you can add &wg_language=fr at the end of the URL like this : http://website.com/wp-admin/post.php?post=632&action=edit&wg_language=fr
    Once you are in this URL, send the email from the backend and Weglot will use this parameter to send the email translated.

    Best regards,

    Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Mark as resolved

    Thread Starter miikewordpress

    (@miikewordpress)

    Hi @wpr0ck

    I doubt that solution would work for most of the WooCommerce stores.

    Suppose we have 100 orders to change status from Processing to Completed.
    No one actually goes to each order detail to change status manually. Usually it’s done via bulk edit method.
    By doing this manually as you suggested, you would also have to guess the language of the particular order by just looking at their address without knowing their selected language upon checkout. They could’ve selected English although they live in France for example.
    In our case we use YITH order tracking plugin that when we upload a csv file containing tracking numbers of say 100 orders, it will add tracking numbers to the orders as well as change their status to Completed which in turn triggers the emails to be sent.
    I believe most of other stores use tracking number plugins in one way or another to bulk change the status to Completed because manually changing the status just doesn’t work after say 30 orders a day.

    Plugin Author Remy B

    (@remyb92)

    Hi there,

    Remy here, one of the plugin’s developer. You’re right, it’s not ideal as you would have to do this manually, we don’t have an automated way for now, it would need first to save the language in which the visitor made the purchase inside the order so that it can be used later.

    I wrote an issue about it https://github.com/weglot/translate-wordpress/issues/101 to investigate an improvement on that

    Thanks

    Thread Starter miikewordpress

    (@miikewordpress)

    Hi Remy,

    Thank you for taking this issue to github, I really appreciate it.
    I will try to find some temporary workaround for the time being.

    Thank you.

    Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Hello @miikewordpress,

    Version 3.1.7 of the Weglot WordPress plugin introduces a new feature that allows you to translate all Woocommerce emails related to an order sent to customers.
    It’s not activate by default in this version, but you can easily activate it with a simple line of code explained here : https://developers.weglot.com/wordpress/use-cases/translation-of-woocommerce-emails-sent-to-customers

    I hope you enjoy this feature and I remain available if you have feedback or if you need help with it.

    Best regards,

    Thread Starter miikewordpress

    (@miikewordpress)

    Hello @wpr0ck,

    That’s a great news! Thanks for letting me know.

    However, after updating the plugin to 3.1.7 it still doesn’t translate subsequent emails.
    I’ve put add_filter( 'weglot_wooccommerce_translate_following_mail', '__return_true' ); in functions.php then turned on the email translation option on Weglot settings.
    I also tried other email addresses on the browser’s incognito mode. Tried with logged-in and guest checkouts. I still couldn’t make it work.
    I went to the database and looked for a custom field named ‘weglot_language’ in wp_postmeta but could not find it. Maybe it’s not saving the language to the order?
    Is this feature being used without an issue for other users?
    Please advise thank you!

    Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Hello @miikewordpress,

    We discovered that the hook might not work if called from a theme. We have updated our documentation with 2 new methods to do this. Please, can you try with these new methods and tell me if it works now on your site?

    Best regards

    Thread Starter miikewordpress

    (@miikewordpress)

    Hi Julien,

    Thanks for your reply. I thought adding the filter in functions.php would work.
    Now I tried the first method and it works perfectly.

    Thank you very much!

    Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    You’re welcome 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WooCommerce order emails are not translated except the very first email’ is closed to new replies.