• Resolved benkerve

    (@benkerve)


    Hi,

    Is there a way to stop the email being sent to a user when they’ve been approved or denied? ie. the email that starts… “…You have been approved to access xxx…”. As we would like to handle this manually elsewhere. This is via the Free version. Happy to use code snippets etc if not available through the plugin GUI.

    Kind regards,

    Ben

    • This topic was modified 11 months ago by benkerve.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @benkerve,

    Thanks for contacting us,

    Hope you are doing well, We’ve informed our technical team about your issue, and they will work on it promptly. When we receive their response, we will get back to you. Our team is here to assist you.

    Thanks & Regards
    WP Experts Support Team

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @benkerve,

    Please use this code in the functions.php file of the active theme to stop emails on user approval and denial from the New User Approve Plugin.

    Here is the code:

    $nua_class=pw_new_user_approve();
    remove_action( 'new_user_approve_deny_user', array( $nua_class, 'deny_user' ) );
    remove_action( 'new_user_approve_approve_user', array($nua_class, 'approve_user' ) );
    add_action( 'new_user_approve_approve_user',function( $user_id )
    {
    	$user = new WP_User( $user_id );
    	wp_cache_delete( $user->ID, 'users' );
    	wp_cache_delete( $user->data->user_login, 'userlogins' );
    	update_user_meta( $user->ID, 'pw_user_status', 'approved' );
    	do_action( 'new_user_approve_user_approved', $user );
    } );
    
    
    

    If you have any questions, feel free to reach out. We’re here to assist you.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stop approved email to user?’ is closed to new replies.