Created
September 14, 2023 13:14
-
-
Save MattRyanCo/467c81b6a435e8a6def3a795c5714e40 to your computer and use it in GitHub Desktop.
Disable auto update notices - add code snippet.
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
// Dissable core auto update notices if sucessful. | |
add_filter( 'auto_core_update_send_email', 'capweb_stop_auto_update_emails', 10, 4 ); | |
function capweb_stop_update_emails( $send, $type, $core_update, $result ) { | |
if ( ! empty( $type ) && $type == 'success' ) { | |
return false; | |
} | |
return true; | |
} | |
// Dissable theme and plugin auto update notices. | |
add_filter( 'auto_plugin_update_send_email', '__return_false' ); | |
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