0

On a fresh-brand-new-blank wp, I've installed "UsersWP plugin" and it works well. But it sounds like as soon as the plugin is activated, the mail to the admin for notifying him a new user is created, seems not working when I use WP admin panel to create a new user.

  • I've try "Email & Log Check" plugin which send me a mail correctly.
  • The notification mail for the new user is sent and arrived well.
  • Everything is check in the plugin to send notif'admin email.
  • My host doesn't block my mail, and no-one in the spam.
  • I try using "brevo" a SMTP plugin, no change.
  1. So, after long time to understand the plugin's core code in vain, I would like to know if you've got some idea to share. In another way, what could prevent this behaviour in a plugin?

  2. And I would like to know which hook is used to send the email for the admin after a new user creation.

Thanks a loooot ! Nicolas.

1 Answer 1

1

Third party plugins are off-topic here, so you'll need to address your main question to the plugin developer. Your second question is generic enough that I'll provide an answer here:

And I would like to know which hook is used to send the email for the admin after a new user creation.

The user notifications are sent by the wp_send_new_user_notifications() function, which is hooked in the following places in wp-includes/default-filters.php:

add_action( 'register_new_user', 'wp_send_new_user_notifications' );
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );

On multisite they are hooked in wp-includes/default-filters.php:

add_action( 'network_site_new_created_user', 'wp_send_new_user_notifications' );
add_action( 'network_site_users_created_user', 'wp_send_new_user_notifications' );
add_action( 'network_user_new_created_user', 'wp_send_new_user_notifications' );
1
  • Thank you, I'll already send a mail to the support and I will dig the way you're talking about.
    – nico
    Sep 30, 2023 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.