Change pending status message
-
Dear Team
I hope you are doing fineWhile using the plugin New User Approve, i noticed a message as follows being display when user is not approved: ERROR Your account is still pending approval
I want to change this message to this one : Admin approval not completed yet to proceed further
Can anyone please help how can i change this message ?
Thank
Best regards
Heman
-
Hi @annunto,
You can modify the message using the filter hook
new_user_approve_pending_errorthis filter has an argument of$message.Kindly paste this code into your child theme’s functions.php file.
add_filter('new_user_approve_pending_error', function( $message ) { return "Admin approval not completed yet to proceed further"; });Also the options to modify the messages and emails are already available in the premium version of the plugin.
Thanks
Hi @annunto,
We haven’t heard from you so we’re going to mark this thread as resolved. Feel free to open a new one if you need.
Thanks
Hello @arsalantariq
First of all, my apologies for being soo late to reply.Thanks you very much for the explanation.
I will do it tomorrow 27/01/2022.
If i encounter any issue i will let you know.
Thanks
Best Regards
HemanHi @annunto,
Sure.
Hello @arsalantariq
I hope you are fineI have noticed when a user is not approval yet by the admin to login , earlier the message display was Error: Your account is still in pending approval
I do not know , if with the latest release , there has been some modifications on this side , the message has been changed to Password is incorrect. Please try again.
I believe this is not good , it give the user a wrong impression that their password is not good, but instead it is just admin approval that need to further proceed.
i have use the code
add_filter('new_user_approve_pending_error', function( $message ) { return "Admin approval not completed yet to proceed further"; });in the path wp-content/ themes/ oceanwp/functions.php
It is still displaying the error : Password is incorrect. Please try again.
Can you please help me out
link – https://goodharvestltd.com/login/
please make a test with
username – H1annunto
pass – Heman_13579Can you please help me out ?
Thank you
Hi @annunto,
We are checking this issue and we will get back to you as soon as possible.
Hello @arsalantariq
Thank for the updateBest regards
Hi @annunto,
The issue seems to be only happening with ultimate member plugin. You can use this custom code in theme’s function.php
add_filter('new_user_approve_pending_error', function( $message ) { unset(UM()->form()->errors['user_password']); // if code execution is here means the user is // still pending approval, so we dont need the // password error for now. add_filter('login_errors', 'nua_approval_pending_error_for_um' ,1000, 2); return $message; }); function nua_approval_pending_error_for_um($error, $key) { if ( 'pending_approval' == $key) { $error = "Admin approval not completed yet to proceed further"; } return $error; }Thanks
-
This reply was modified 4 years, 4 months ago by
A.Tariq.
Hello @arsalantariq
Thanks for the custom code, i will check it and will keep you posted.
Thank you
Best Regards
Heman-
This reply was modified 4 years, 4 months ago by
annunto.
Hello @arsalantariq
i hope you are doing wellI have just check the custom code , as a test i have insert the code as follows :
1- In the theme function.php
2- In the Code SnippetTesting on both side , display the same message Password is incorrect. Please try again.
Thanks
Hello @arsalantariq
I am using theme Ocean WP, i have added it in the path wp-content/themes/oceanwp/function.php (parent theme)
Do you think it should have work.
Thanks
Hi @annunto,
Yes, this code worked on our staging site. You have to contact the ‘ultimate member’ support as the wrong message is appearing from their plugin.
Thanks
Hello @arsalantariq
Thank you for the update
I am contacting the member support of ultimate plugin to see what they can do ?
i will keep you posted.
Thank you
-
This reply was modified 4 years, 4 months ago by
The topic ‘Change pending status message’ is closed to new replies.