Email notification after registration in Wordpress

I would like the site's administrator doesn't receive a new user's registration email when the administra

I would like the site's administrator doesn't receive a new user's registration email when the administrator himself uses the admin interface to add a user.

How can I limit sending a email only when a user completes the registration form ?

// If the registration form was completed by a user ...

add_action( 'user_register', 'user_registration_save', 10, 1 );
function user_registration_save( $user_id ) {
   $to = '';
   $subject = 'New register with the form';
   $message .= "Identifiant : " . $user->user_login . "\r\n\r\n";
   $message .= "E-mail : " . $user->user_email;
   wp_mail( $to, $subject, $message );
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745554456a4632732.html

相关推荐

  • Email notification after registration in Wordpress

    I would like the site's administrator doesn't receive a new user's registration email when the administra

    12小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信