Hey @flaviendev
I just posted the same question and afterwards I stumbled on your “Question” topic.
It would be indeed nice if only the failed update emails will be sent.
-
This reply was modified 6 years, 1 month ago by
nesoor.
Hello,
Sure, there two ways to disable email notifications: with a constant in your wp-config file, or using a filter in your theme’s functions.php file.
Using constants
Disable plugins auto-updates email notifications:
define( 'WP_DISABLE_PLUGINS_AUTO_UPDATE_EMAIL', false );
Disable themes auto-updates email notifications:
define( 'WP_DISABLE_THEMES_AUTO_UPDATE_EMAIL', false );
Using filter hooks
Disable plugins auto-updates email notifications:
function wporg_disable_plugins_auto_update_email() {
return false;
}
add_filter( 'send_plugins_auto_update_email', 'wporg_disable_plugins_auto_update_email' );
Disable themes auto-updates email notifications:
function wporg_disable_themes_auto_update_email() {
return false;
}
add_filter( 'send_themes_auto_update_email', 'wporg_disable_themes_auto_update_email' );
Cheers,
Jb
@nesoor successful and failed auto-updates are merged into only one email, to avoid flooding mailboxes.
That being said you can hook on the notification emails and send only failed updates, using wp_autoupdates_notifications_email filter.
Marking this issue as resolved 🙂
-
This reply was modified 6 years ago by
Jb Audras.