Disable New User Notification Emails in WordPress
You don’t always need to know when a new user has registered for your site. Since WordPress pluggable functions must be replaced via a plugin,Â I created this simple plugin, Disable New User Notifications, to do just that: disable new user notification emails in WordPress.
WordPress has a slew of pluggable functions, and one of those functions is
wp_new_user_notification(). This function serves two purposes: to send new user notifications via email to the admin and to send the username and password to the newly registered user.
Should you have a site where user registrations are required, this could get annoying very quickly. This plugin simply removes the admin notification that a new user has been created. The newly registered user will still receive his/her email with their login credentials.
The plugin is very small (only 22 lines of actual code) – so let’s take a look at the code inside of it.
All we are doing is checking to make sure the function doesn’t already exist, and if it doesn’t, we make our own version of
wp_new_user_notification(). We simply prepare and send the email to the newly registered user and nothing more.