wp_send_new_user_notification_to_admin filter-hookWP 6.1.0

Filters whether the admin is notified of a new user registration.

Usage

add_filter( 'wp_send_new_user_notification_to_admin', 'wp_kama_send_new_user_notification_to_admin_filter', 10, 2 );

/**
 * Function for `wp_send_new_user_notification_to_admin` filter-hook.
 * 
 * @param bool    $send Whether to send the email.
 * @param WP_User $user User object for new user.
 *
 * @return bool
 */
function wp_kama_send_new_user_notification_to_admin_filter( $send, $user ){

	// filter...
	return $send;
}
$send(true|false)
Whether to send the email.
Default: true
$user(WP_User)
User object for new user.

Changelog

Since 6.1.0 Introduced.

Where the hook is called

wp_new_user_notification()
wp_send_new_user_notification_to_admin
wp-includes/pluggable.php 2152
$send_notification_to_admin = apply_filters( 'wp_send_new_user_notification_to_admin', true, $user );

Where the hook is used in WordPress

Usage not found.