Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You have an e-commerce website with two domain names on a single WP installation using WooCommerce and WP Mail SMTP. You want to change the 'From' email address and 'From' name depending on the selected language, but you are unable to translate these settings in WP Mail SMTP.
Solution:
We recommend adding the following XML code to enable translation of the 'From' email settings:

<wpml-config><br />    <admin-texts><br />        <key name="wp_mail_smtp"><br />          <key name="mail">          <br />            <key name="from_email" /><br />            <key name="from_name" /><br />            <key name="from_email_force" />            <br />          </key><br />        </key><br />    <admin-texts><br /></wpml-config>

Add this code to WPML > Settings > Custom XML Configuration tab. Afterward, you will be able to translate the option in WPML > String Translation.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket.

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: 

This topic contains 11 replies, has 2 voices.

Last updated by Christopher Amirian 2 years, 6 months ago.

Assisted by: Christopher Amirian.

Author Posts
May 17, 2022 at 9:36 am #11235955

paulJ-11

Hi,

We have a e-commerce website with two domain names on a single WP-installation.

We're using:
- Woocommerce
- WP Mail STMP

For emails from the website, we would like to change the From email address and From name, depending on the selected language.

However, we cannot seem to translate that in WP Mail STMP.

May 17, 2022 at 11:41 am #11237473

paulJ-11

Hi,

I've followed the steps as suggested and translated admin_texts_woocommerce_email_from_address.

However, on the secondary language, it still sends from the original email address, not the translated one.

May 18, 2022 at 7:02 am #11243629

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you very much. Now that you translated the option and it is still showing the original language, I suspect it might be an admin-related string that is not possible to translate depending on the front-end language.

There are some admin-related data that can be accessed in WordPress Dashboard only and that is why it is dependent on the language of the dashboard.

Would you please do a test?

- Go to "WordPress Dashboard > Users > Profile
- Change the Dashboard language to the second language from there.
- Test the email and see if this time it sends the FROM option in the second language.
- Go back to Users > Profile and change back to the original language.
- Now test and see if it sends the option in the original language.
- If yes, then it is a feature dependent on the admin dashboard language and not the front end of the website.

Thank you

May 19, 2022 at 9:10 am #11254341

paulJ-11

Hi Christopher,

I've tried the above suggestions, but it still keeps sending the emails in the original language even though the field admin_texts_woocommerce_email_from_address is translated to another email address.

Hope you can help to solve this. Thanks.

May 19, 2022 at 12:04 pm #11256805

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for testing that.

Ok, if this is a compatibility issue I need to report this to the compatibility team.

To be able to report the compatibility issues we need to replicate the issue on a clean installation.

I created a clean installation of WordPress, Woocommerce, WP Mail SMTP, WPML, and all necessary WPML add-ons.

You can access the WordPress dashboard using the link below:

hidden link

Kindly follow the steps below:

- Send an email and test it in WP Mail Log menu

This will help us to report the probable issue to the compatibility team and solve the possible problem faster.

Thank you.

May 19, 2022 at 1:38 pm #11257621

paulJ-11

Hi Christopher,

I'm not sure the sandbox is the same a my situation. My problem is that the Woocommerce emails are not sent in the secondary language.

I've sent an email and checked WP Mail Log menu, but i'm not sure how this can help...

May 19, 2022 at 1:55 pm #11257787

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Yes please, I also installed Woocomemrce and Woocommerce Multilingual so you can use Woocommerce to send the emails. May placing an order?

The reason that I asked you to check the sandbox is that it is the only way to be able top report to the compatibility team.

Meanwhile, I will be happy to check your website if you give me the login info.

I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Also, which Woocommerce action you do to send the email so I can check

Thank you.

May 19, 2022 at 3:03 pm #11258295

paulJ-11

Hi Christopher,

I've created an order in the sandbox (NL) and choose to send the details of that order to the client (me). In WP Mail Log I can see that it is still sent from the default email address (no-reply@wpml.org), and not the translated one (demo@wpml.org).

May 19, 2022 at 3:08 pm #11258341

paulJ-11

I use the plugin hidden link to test emails from existing orders.

Could you send me a link, so that I can send the login detail privately? Thx.

May 21, 2022 at 4:54 am #11270499

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you I am going to check and report the sandbox issue that you have mentioned.

Meanwhile, you can provide the login information by selecting the next reply as private.

May 24, 2022 at 2:52 pm #11294429

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for the information. I did not find any items to be able to translate the From Email and From Name options of the WP Mail SMTP plugin.

I reported this to the compatibility team.

I will get back to you if there is an update.

Thank you.

May 25, 2022 at 12:01 pm #11304321

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I have an answer from the compatibility team.
Please add the XML code below:

<wpml-config>
    <admin-texts>
        <key name="wp_mail_smtp">
          <key name="mail">          
            <key name="from_email" />
            <key name="from_name" />
            <key name="from_email_force" />            
          </key>
        </key>
    </admin-texts>
</wpml-config>

To WPML > Settings > Custom XML Configuration (tab)

After that you will be able to translate the option in WPML > String Translation

Thank you.