Skip to content

Instantly share code, notes, and snippets.

@finalwebsites
Created November 21, 2024 10:51
Show Gist options
  • Save finalwebsites/a7c9a9ceec3f1a71017cf7003fff2d30 to your computer and use it in GitHub Desktop.
Save finalwebsites/a7c9a9ceec3f1a71017cf7003fff2d30 to your computer and use it in GitHub Desktop.
Disable WordPress update email notifications
<?php
// place the code below into the functions.php file from your WordPress child theme
// disable core update notifications
add_filter( 'auto_core_update_send_email', 'fws_stop_auto_update_emails', 10, 4 );
function fws_stop_update_emails( $send, $type, $core_update, $result ) {
if ( ! empty( $type ) && $type == 'success' ) {
return false;
}
return true;
}
// disable plugin update notifications
add_filter( 'auto_plugin_update_send_email', '__return_false' );
// disable theme update notifications
add_filter( 'auto_theme_update_send_email', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment