Skip to content Skip to sidebar

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

Problem:
You are experiencing issues with email translations in a bilingual site (Spanish and English) using the Indeed Ultimate Membership Pro plugin. Specifically, emails notifying users about account activation and deletion are not translating correctly and default to Spanish regardless of the request language.
Solution:
The issue stems from the need for the Indeed Ultimate Membership Pro plugin to include compatibility code for WPML. We cannot resolve this directly from our end. We recommend forwarding the following documentation to the Indeed support team to request the necessary compatibility updates:

Additionally, you can contact the Indeed support directly here: https://support.wpindeed.com/

If this solution does not apply to your case, or if it becomes outdated, 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. Should you need further assistance, please open a new support ticket with us.

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 24 replies, has 3 voices.

Last updated by Andreas W. 1 year, 7 months ago.

Assisted by: Andreas W..

Author Posts
May 4, 2024 at 8:10 pm #15593789

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I have created a custom solution for this issue.

Add the following code to the bottom end of the functions.php file of your Child Theme:

add_action( 'user_register', function ( $user_id ) {
  $userdata = array();
  $current_lang = apply_filters('wpml_current_language', NULL);  
  $userdata['ID'] = $user_id;

  if ($current_lang == "en") {
      $userdata['locale'] = "en_US"; 
    } elseif ($current_lang == "es") {
      $userdata['locale'] = "es_ES"; 
    }       
  wp_update_user( $userdata );
});

This snippet will set the user meta value on the database for any newly registered user based on the site's default language.

According to my test, this should solve the issue.

Please confirm if this workaround solves the issue for you.

Take note, that this snippet will only work for new registered users. For existing users, you will need to set the desired language inside their user profiles.

May 7, 2024 at 9:11 pm #15603905

anabellaR

I added the code and tested it by registering new users, indicating the language, but the same problem continues, it still does not detect the English language for pending notifications.

May 7, 2024 at 10:10 pm #15603917

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

What this code does, is setting the user language if a new user registers.

Before triggering the e-mail, please verify the user language inside the user's profile.

This code will not adjust the language setting for existing users.

About "Pending notification":

How do I set a new user to have the state "Pending" - I am sadly not finding such an option.

Please recreate the issue on the following test site and provide me with detailed steps on how to recreate this issue:

hidden link

May 8, 2024 at 2:44 pm #15606821

anabellaR

I entered the test page and it indeed adjusts the user's language in the profile according to the language selected for registration. Only here I cannot replicate the error since the emails do not arrive.

In the case of the page I work with, after adding the code it also indicates the language in the user's profile, only the notifications are not yet received in English for account approval. Do you receive account approval notifications in the configured language?

Could you try to replicate this test on my page or enable emails to arrive on the test page to do the full walkthrough?

May 8, 2024 at 5:55 pm #15607496

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The test site can not send emails. Please go to the right sidebar and select "Email Log".

I am sorry, that I am repeating myself for the third time, but how do I set a new user to have the state "Pending"? I am sadly not finding such an option.

May 8, 2024 at 7:20 pm #15607707

anabellaR

Sorry, I didn't understand this request before.

To modify the user's status to "Pending" you can enter the "New users" option in the top bar, then select the "Manage profile" button for the user to edit, there you press the "Edit member profile" button and At the end you will find the "WordPress Role" option to change the status.

May 9, 2024 at 4:21 am #15608426

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Good news! I was finally able to replicate the issue again!

It looks as if the admin language also will need to be taken into consideration.

If the admin language is set to Spanish and the admin deletes the account, then the email is sent in Spanish and if I set the admin language for the admin who is deleting the account to English, the email is sent in English.

I will need some more time to test this and try to find a workaround.

The "Pending" notification is not being sent on my sandbox, no matter if I switch the user role manually or if I set "Pending" as the default role for new users.

May 9, 2024 at 4:09 pm #15611553

anabellaR

I understand, I will be attentive to any news.

I thank you in advance for all the support you have provided so far.

May 10, 2024 at 10:41 am #15614143

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

You are very welcome!

Please take note, that I am currently still waiting on feedback from the compatibility team and I will be in contact with you soon.

May 10, 2024 at 3:31 pm #15615639

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The compatibility team has finished reviewing the reported issue, which is kind of expected in this case. The author of the plugin will need to include a compatibility code for WPML in the plugin so that the email can be sent as expected.

This means that we can not solve the issue from our end and the solution can only get included directly in the plugin "Indeed Ultimate Membership Pro".

We provide the following documentation for this purpose:
https://wpml.org/documentation/support/sending-emails-with-wpml/

The author needs to follow the above documentation and also has the option to join our Compatibility Program so that we can support the author on this matter:
https://wpml.org/documentation/support/go-global-program/

Please forward the above information to the Support of WPIndeed and request a feature request to obtain compatibility with WPML.

hidden link