Code snippet to change notification of new users

If you find this free website useful – why don’t you support this with a donation? It is easy…. read more ….

Example plugin to set admin notification of new users. In this case it uses the first user defined as shop_manager role

 * Plugin Name:       Notify New Users to Shop Manager
 * Plugin URI:
 * Description:       Needs Woo Commerce of Course
 * Version:           1.0
 * Author:            Fullworks
 * Author URI:
 * License:           GPL-3.0+
 * License URI:

function admin_email_callback( $wp_new_user_notification_email,  $user,  $blogname ) {
    $shopmanager = get_users( array( 'role' => 'shop_manager' ) );
// set the to: the first shop manager email.
    $wp_new_user_notification_email['to'] = $shopmanager[0]->user_email;
    return $wp_new_user_notification_email;
add_filter( 'wp_new_user_notification_email_admin', 'admin_email_callback', 10, 3 );

Download this as a plugin from fullworks ->



, ,




Leave a Reply

Your email address will not be published. Required fields are marked *