• Resolved evilash182

    (@evilash182)


    Is the approval email sent to all administrators of the website? If not, is it possible to change who this email is sent to?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @evilash182,
    In the free version, the approval email only gets sent to the main admin of the site, and currently, there is no available filter to change the recipient of that email.

    In the pro version, you have options to

    Send notification emails to all admins
    Don’t send notification emails to current site admin.

    Have a look at this image mentioned below to see options available in the pro version.

    https://prnt.sc/synmiz

    Is there any way to send to ANOTHER user as the approver? The use case is for woo commerce with a store manager role. The site admin does not need to be notified but we want the user that is a store manager to be. Everything I have read is it is always “admin” level notifications.

    Hi @ccolotti,

    We will look for the possibilities to approve the users other than the admin role.

    Thanks yes we want a custom role to get the notifications, simply put.

    Hi @ccolotti,

    We have added this compatibility in our road map and will try to roll out the next release with compatibility as soon as possible.

    Thanks!

    Hi @ccolotti,

    Add the below code to child theme’s function.php

    In order to change which capabilities/roles can access the New User Approve page.

    function new_user_approve_new_cap($cap){
        //$cap ='read';
    
    return $cap;
    }
    
    add_filter( 'new_user_approve_minimum_cap', 'new_user_approve_new_cap' );

    After adding this code please make sure to uncomment the var $cap and assign the value to the variable as your custom role name.

    Example: $cap = ‘yourcustomrole’;

    Let us know if you have any questions.

    Hi @evilash182,

    In order to send an Approval email to the custom user please add the below-mentioned code in your themes function.php file.

    function new_user_approve_email_send_to($to){
    
    $shop_managers = array('[email protected]');
    
        return $shop_managers;
    }
    
    add_filter( 'new_user_approve_email_admins', 'new_user_approve_email_send_to' );

    Thanks….will test it. Can this be added by the snippets plugin or only via Functions.php? Either way is fine, been trying to move as much to snippets for easy tracking and import/export..

    Also what would the syntax be for sending to more than one custom role and does this addition actually negate the admin notification once implemented?

    • This reply was modified 4 years, 6 months ago by ccolotti.
    • This reply was modified 4 years, 6 months ago by ccolotti.

    Hi @ccolotti,

    You need to add the shared code in your themes function.php file. Also, for sending the email to more than one user role you can modify the below-shared code snippet according to your requirements.

    function new_user_approve_email_send_to($to){
    
    // Getting the users of first role
    $first_role= get_users( array( 'role' => 'youCustomRole1' ) );
    $first_role_users = wp_list_pluck( $first_role, 'user_email' );
    
    //Getting the users of second role
    $second_role= get_users( array('role' => 'youCustomRole2') );
    $second_role_users= wp_list_pluck( $second_role, 'user_email' );
    
    //Merging all users.
    $all_users = array_merge($first_role_users ,$second_role_users);
    
        return $all_users ;
    }
    
    add_filter( 'new_user_approve_email_admins', 'new_user_approve_email_send_to' );
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change Admin Email’ is closed to new replies.