Home  >  Article  >  CMS Tutorial  >  How to disable automatic update email notifications in WordPress

How to disable automatic update email notifications in WordPress

藏色散人
藏色散人forward
2019-12-23 13:52:572876browse

The following column wordpress tutorial will introduce to you how to disable automatic update email notifications in WordPress. I hope it will be helpful to friends in need!

How to disable automatic update email notifications in WordPress

#By default, after a minor version of WordPress is safely updated, an email will be sent to notify you that your site has been updated. If you have multiple WordPress sites, it is a bit annoying to send them once to each site. You can use the method in this article to disable the automatic update email notification function of WordPress.

Add the following code to the functions.php of the current theme:

add_filter( 'auto_core_update_send_email', 'wpb_stop_auto_update_emails', 10, 4 );
function wpb_stop_update_emails( $send, $type, $core_update, $result ) {
if ( ! emptyempty( $type ) && $type == 'success' ) {
return false;
}
return true;
}

The above code disables the automatic update email notification function by adding a filter.

For more WordPress-related technical articles, please visit the WordPress Tutorial column: //m.sbmmt.com/cms/wordpress/

The above is the detailed content of How to disable automatic update email notifications in WordPress. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:zmingcx.com. If there is any infringement, please contact admin@php.cn delete