Disable Email Notification For Successful Updates

[ad_1]

In version 3.7, WordPress introduced automatic background WordPress updates. We recently posted about disabling automatic updates in WordPress for security reasons but if you really like the idea of automatic background updates then how to enable automatic updates for major WordPress releases. When WordPress updates its core, it sends an email notification to the website owner for success or failure. If you receive a fair amount of emails and want to avoid just another such email then you can disable email notification for successful WordPress updates.

Although I believe it does not hurt to receive update notification one or twice a month because WordPress updates are not that frequent. But still if you wish to disable email notification from being sent in the first place then WordPress have a couple of filters auto_core_update_email and auto_core_update_send_email which can be used to change the default behavior.

Use this following code snippet to disable email notification for successful WordPress updates. Just paste it in your theme’s functions.php file and you will not receive such emails any further.

// disable email notification for successful update
function wcs_disable_auto_update_emails( $send, $type, $core_update, $result ) {
    if ( ! empty( $type ) && $type == 'success' ) {
        return false;
    }
    return true;
}
add_filter( 'auto_core_update_send_email', 'wcs_disable_auto_update_emails', 10, 4 );

It’s important to note that above code will disable email notification only for successful WordPress updates. If update was unsuccessful then it will allow email to be sent which is recommended in all cases.

[ad_2]

Leave a Reply

Random Post Selection ::

Recent Posts

Unlock Unlimited Downloads