• Resolved annunto

    (@annunto)


    Dear Team
    I hope you are doing fine

    While 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

Viewing 15 replies - 1 through 15 (of 19 total)
  • A.Tariq

    (@arsalantariq)

    Hi @annunto,

    You can modify the message using the filter hook new_user_approve_pending_error this 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

    A.Tariq

    (@arsalantariq)

    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

    Thread Starter annunto

    (@annunto)

    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
    Heman

    A.Tariq

    (@arsalantariq)

    Hi @annunto,

    Sure.

    Thread Starter annunto

    (@annunto)

    Hello @arsalantariq
    I hope you are fine

    I 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_13579

    Can you please help me out ?

    Thank you

    • This reply was modified 3 years, 1 month ago by annunto.
    • This reply was modified 3 years, 1 month ago by annunto.
    A.Tariq

    (@arsalantariq)

    Hi @annunto,

    We are checking this issue and we will get back to you as soon as possible.

    Thread Starter annunto

    (@annunto)

    Hello @arsalantariq
    Thank for the update

    Best regards

    A.Tariq

    (@arsalantariq)

    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 3 years, 1 month ago by A.Tariq.
    Thread Starter annunto

    (@annunto)

    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 3 years, 1 month ago by annunto.
    A.Tariq

    (@arsalantariq)

    Hi @annunto,

    Sure.

    Thanks

    Thread Starter annunto

    (@annunto)

    Hello @arsalantariq
    i hope you are doing well

    I 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 Snippet

    Testing on both side , display the same message Password is incorrect. Please try again.

    Thanks

    A.Tariq

    (@arsalantariq)

    Hi @annunto,

    Please make sure that you have added in the child theme’s functions.php file.

    Thanks

    Thread Starter annunto

    (@annunto)

    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

    A.Tariq

    (@arsalantariq)

    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

    Thread Starter annunto

    (@annunto)

    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

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Change pending status message’ is closed to new replies.