Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

No email after successful automatic updates

WordPress stops emailing you every time a plugin, theme or WordPress itself updates on its own. You still get an email when an update fails.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Tested with WordPress 7.1
PHP
<?php

// Core: keep the "failed" and "critical" emails.
add_filter( 'auto_core_update_send_email', static fn( $send, $type ) => in_array( $type, array( 'fail', 'critical' ), true ) ? $send : false, 10, 2 );

// Plugins and themes: only send when something failed.
$only_failures = static function ( $send, $results ) {
	foreach ( (array) $results as $result ) {
		if ( empty( $result->result ) || is_wp_error( $result->result ) ) {
			return $send;
		}
	}
	return false;
};
add_filter( 'auto_plugin_update_send_email', $only_failures, 10, 2 );
add_filter( 'auto_theme_update_send_email', $only_failures, 10, 2 );

In these packs

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.