wp_send_new_user_notification_to_user
Filters whether the user is notified of their new user registration.
Usage
add_filter( 'wp_send_new_user_notification_to_user', 'wp_kama_send_new_user_notification_to_filter', 10, 2 );
/**
* Function for `wp_send_new_user_notification_to_user` 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_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_send_new_user_notification_to_user
wp-includes/pluggable.php 2361
$send_notification_to_user = apply_filters( 'wp_send_new_user_notification_to_user', true, $user );