Home / Admin / Disable Update Emails
Duplicate Snippet

Embed Snippet on Your Site

Disable Update Emails

Code Preview
php
<?php
// Disable auto-update email notifications
add_filter('auto_core_update_send_email', 'disable_auto_update_emails', 10, 4);
function disable_auto_update_emails($send, $type, $core_update, $result) {
    if ( !empty($type) && $type == 'success' ) {
        return false;
    }
    return true;
}
// Disable plugin and theme update email notifications
add_filter('auto_plugin_update_send_email', '__return_false');
add_filter('auto_theme_update_send_email', '__return_false');
// Disable core update notification emails
add_filter('send_core_update_notification_email', '__return_false');
// Disable email notifications for failed plugin/theme updates
add_filter('auto_plugin_theme_update_email', '__return_false');
// Disable email notifications for failed core updates
add_filter('automatic_updates_send_debug_email', '__return_false');
add_filter('automatic_updates_is_vcs_checkout', '__return_false', 1);
// Disable email notifications for background updates
add_filter('automatic_updates_complete', function($email, $type, $bulk) {
    return false;
}, 10, 3);

Comments

Add a Comment