auto_plugin_update_send_email
Filters whether to send an email following an automatic background plugin update.
Usage
add_filter( 'auto_plugin_update_send_email', 'wp_kama_auto_plugin_update_send_email_filter', 10, 2 );
/**
* Function for `auto_plugin_update_send_email` filter-hook.
*
* @param bool $enabled True if plugin update notifications are enabled, false otherwise.
* @param array $update_results The results of plugins update tasks.
*
* @return bool
*/
function wp_kama_auto_plugin_update_send_email_filter( $enabled, $update_results ){
// filter...
return $enabled;
}
- $enabled(true|false)
- True if plugin update notifications are enabled, false otherwise.
- $update_results(array)
- The results of plugins update tasks.
Changelog
| Since 5.5.0 | Introduced. |
| Since 5.5.1 | Added the $update_results parameter. |
Where the hook is called
auto_plugin_update_send_email
wp-admin/includes/class-wp-automatic-updater.php 1177
$notifications_enabled = apply_filters( 'auto_plugin_update_send_email', true, $update_results['plugin'] );