Support » Fixing WordPress » How to prevent update nag emails

  • Hi,

    I prefer not to get emails to remind me to update WP.

    Just to be clear, I am ok with getting emails that have notified me of updates that have occurred. I just don’t want to be emailed multiple times a day to let me know an update is needed.

    I have tried the following code in a plugin and none of them work:

    add_filter('send_core_update_notification_email', function($junk){return false;});
    
    add_filter( 'send_core_update_notification_email', '__return_false' );  
    
    apply_filters( 'send_core_update_notification_email', '__return_false' );  

    Any help is appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Joy

    (@joyously)

    I’ve never heard of WP sending emails for that. Are you sure you don’t have a plugin like https://wordpress.org/plugins/mail-on-update/ installed?

    Hi, thanks for trying to help out 🙂

    I dont have that plugin installed.

    The full message I get is:

    Please update your site at https://site to WordPress 5.0.3.

    Updating is easy and only takes a few moments:
    https://site/wp-admin/update-core.php

    If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.

    Support Forums

    Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.

    The WordPress Team

    The string:

    Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.

    Is found on line 739 of

    https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-automatic-updater.php

    And other strings of the message are in that file as well. So I think it is part of wordpress core….

    Joy

    (@joyously)

    Ah, I see the problem.
    You are filtering the wrong thing. For the filter that you tried, the parameter is whether the admin has been notified already. You are returning false, so that’s backward.
    You could change that to return true, or better would be to filter ‘auto_core_update_send_email’ instead, which you want to return false.

    Ah, ok I will try that.

    Thanks!

    That unfortunately does not work……

    Other help much appreciated…….

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to prevent update nag emails’ is closed to new replies.