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 Ross Morsali

    (@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.