Stop the emails WordPress sends after plugins and themes update automatically, and only get core update emails when something fails.
add_filter( 'auto_plugin_update_send_email', '__return_false' );
add_filter( 'auto_theme_update_send_email', '__return_false' );
// Core updates: only email when an update fails or needs attention.
add_filter( 'auto_core_update_send_email', function ( bool $send, string $type ): bool {
return 'success' === $type ? false : $send;
}, 10, 2 );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
With auto-updates turned on, WordPress emails you after every update run. If you manage many sites, that’s a lot of “Some plugins were automatically updated” emails. This snippet keeps only the ones that need action.
auto_plugin_update_send_email and auto_theme_update_send_email control the plugin and theme summaries. Returning false stops them, including the emails about failed updates, so check Site Health or a monitoring tool instead.
For WordPress core, auto_core_update_send_email receives the type of email. The snippet blocks 'success' only, so you still hear about failures and critical problems.
true only when the second argument contains failed updates.Wait for the next auto-update, or trigger one with wp cron event run wp_version_check. No summary email should arrive.