auto_core_update_send_email filter-hookWP 3.7.0

Filters whether to send an email following an automatic background core update.

Usage

add_filter( 'auto_core_update_send_email', 'wp_kama_auto_core_update_send_email_filter', 10, 4 );

/**
 * Function for `auto_core_update_send_email` filter-hook.
 * 
 * @param bool   $send        Whether to send the email.
 * @param string $type        The type of email to send. Can be one of 'success', 'fail', 'critical'.
 * @param object $core_update The update offer that was attempted.
 * @param mixed  $result      The result for the core update. Can be WP_Error.
 *
 * @return bool
 */
function wp_kama_auto_core_update_send_email_filter( $send, $type, $core_update, $result ){

	// filter...
	return $send;
}
$send(true|false)
Whether to send the email.
Default: true
$type(string)
The type of email to send. Can be one of 'success', 'fail', 'critical'.
$core_update(object)
The update offer that was attempted.
$result(mixed)
The result for the core update. Can be WP_Error.

Changelog

Since 3.7.0 Introduced.

Where the hook is called

WP_Automatic_Updater::send_email()
auto_core_update_send_email
wp-admin/includes/class-wp-automatic-updater.php 770
if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) ) {

Where the hook is used in WordPress

Usage not found.