automatic_updates_debug_email

Filters the debug email that can be sent following an automatic background core update.

Description

apply_filters( 'automatic_updates_debug_email', (array) $email, (int) $failures, (mixed) $this_update_results ); 

Parameters (3)

0. $email (array)
1. $failures (int)
The number of failures encountered while upgrading.
2. $this_update_results (mixed)
The results of all attempted updates.

Usage

To run the hook, copy the example below.
  1. $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this_update_results ); 
  2.  
  3. if ( !empty( $email ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the automatic_updates_debug_email callback 
  2. function filter_automatic_updates_debug_email( $email, $failures, $this_update_results ) { 
  3. // make filter magic happen here... 
  4. return $email
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'automatic_updates_debug_email', 'filter_automatic_updates_debug_email', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'automatic_updates_debug_email', 'filter_automatic_updates_debug_email', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-automatic-updater.php  
  1. $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results );