 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.
|
 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.
|
 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
|
 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?
|
 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.
|
 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.
|
 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.
|
 anabellaR
|
I understand, I will be attentive to any news.
I thank you in advance for all the support you have provided so far.
|
 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.
|
 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
|