Created
November 21, 2024 10:51
-
-
Save finalwebsites/a7c9a9ceec3f1a71017cf7003fff2d30 to your computer and use it in GitHub Desktop.
Disable WordPress update email notifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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