Support » Plugin: Update Control » Emails

  • Hey there

    I’ve been researching this for ages and can’t find a single reference to it.

    Basically I want to disable the email you get before the auto update, letting you know that a version is available to download:

    Please update your site at http://www.foobar.com to WordPress 3.8.2.

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

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

    The WordPress Team

    It is unclear whether this is even part of the wp background updates or not, and if those email settings affect this.

    Any help would be useful, and thanks for the plugin makes life easier.

    Ross

    https://wordpress.org/plugins/update-control/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chip Bennett

    (@chipbennett)

    Hi Ross,

    The pre-update email is actually a separate update process (the original/old update process). Let me dig into core a bit; there’s probably a filter you can use to disable that email.

    Plugin Author Chip Bennett

    (@chipbennett)

    Okay, in wp-admin\includes\class-wp-upgrader.php, there is a function, send_core_update_notification_email(). This is the function that sends the email notifying the administrator that a new core update is available. In that function is a filter:

    if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) )
        return false;
    
    $this->send_email( 'manual', $item );
    return true;

    That basically says, “if $notify is false, then don’t send the email; otherwise, send the email”. So, you just need to tell WordPress that $notify is false. To do that, just add a filter (which you can put in a site functionality Plugin, or a Child Theme:

    function designsandcode_prevent_core_update_email( $notify ) {
        __return_false();
    }
    add_filter( 'send_core_update_notification_email', 'designsandcode_prevent_core_update_email' );

    Thread Starter DesignsAndCode

    (@designsandcode)

    Hey Chip thanks for the fast reply and looking in to this for me although its not even part of the plugin! Much appreciated 🙂

    Plugin Author Chip Bennett

    (@chipbennett)

    No problem. Happy to help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Emails’ is closed to new replies.