Turning off new user notification in WordPress

September 17, 2012 | PHP, Plugins, Themes, Tutorials, Wordpress | 0 comments

I am not entirely sure why you would ever want to do this but I was asked this on the WordPress forums for my Welcome Email Editor plugin. Someone wanted to know if they can turn off the WordPress Welcome Email all together instead of sending one out by default.

Nice and simple really.. You just need to add this to a new plugin or to your theme functions.php file:

if (!function_exists('wp_new_user_notification')) {
 function wp_new_user_notification() {
    return false; 
 }
}

As ever you need to be careful of the plugin name.. WordPress plugins load in name order rather than with any priority. Due to the way in which the function is written it means it can only be declared once and it’s a race to get there as only the first one counts. This is why my Welcome Email Editor plugin works sometimes in conflicting environments when you call the directory a-welcome-email-editor. It then gets called first and then declared before some of the other plugins which might cause issues.

A Donate Button!

0 Comments

Leave a Reply

Divi United

About this site and Sean Barton

Picture of Sean
Sean Barton is a Freelance PHP Website Developer in Crewe, Cheshire. He is a Wordpress and CMS/Framework specialist.
This site was set up in 2008 as a tutorial and scripting resource for the PHP language and Wordpress.
Find out more about Sean on the About Me page or use the Hire Me page to get in touch. For more information about Sean's work take a look at the Portfolio

Our Services

  • Wordpress plugin/theme development
  • Divi specialist
  • Ecommerce (Woocommerce, WPSC, Shopify, Magento)
  • PSD to Wordpress theme conversion (Responsive)
  • Website design work (Banners, Logos, Full Site, etc)
  • Website analysis (security, usability, SEO)
  • API Integrations (InfusionSoft, SalesForce, Ontraport, Customer Thermometer, etc..)
  • Wordpress consultancy & expert advice
  • Crisis support
  • Website hosting

The main services offered are Wordpress based although we do a great deal of technical programming for bespoke systems. From troubleshooting, extending frameworks, finding bugs to writing them from scratch.

Find out more by looking through our past projects or get a quote.

Be the first to hear about new products/updates!

This is a mailing list for those people interested in being told when we release a new product (Divi plugin or Theme).

We shall also use this list to let you know about product updates and releases.

You have Successfully Subscribed!