wppaste
WordPress

apply_filters( 'auto_plugin_theme_update_email', array $email, string $type, array $successful_updates, array $failed_updates )

Since
5.5.0
Filters the email sent following an automatic background update for plugins and themes.

Compatibility

WordPress
since 5.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$emailarray
{ Array of email arguments that will be passed to wp_mail().
@type string $to The email recipient. An array of emails can be returned, as handled by wp_mail().
@type string $subject The email's subject.
@type string $body The email message body.
@type string $headers Any email headers, defaults to no headers.
}
  • $tostring

    The email recipient. An array of emails can be returned, as handled by wp_mail().
  • $subjectstring

    The email's subject.
  • $bodystring

    The email message body.
  • $headersstring

    Any email headers, defaults to no headers.
$typestring
The type of email being sent. Can be one of 'success', 'fail', 'mixed'.
$successful_updatesarray
A list of updates that succeeded.
$failed_updatesarray
A list of updates that failed.

Where this hook fires · 1

  • wp-admin/includes/class-wp-automatic-updater.php:1541WP_Automatic_Updater::send_plugin_theme_email()

Source code

		 *     @type string $headers Any email headers, defaults to no headers.		 * }		 * @param string $type               The type of email being sent. Can be one of 'success', 'fail', 'mixed'.		 * @param array  $successful_updates A list of updates that succeeded.		 * @param array  $failed_updates     A list of updates that failed.		 */		$email = apply_filters( 'auto_plugin_theme_update_email', $email, $type, $successful_updates, $failed_updates ); 		$result = wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] ); 		if ( $result ) {			update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );		}

Changelog

Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.