WordPress禁用自动更新邮件通知

将下面的代码添加到当前主题的 functions.php 中:

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;
}

以上代码通过添加一个过滤器禁用自动更新邮件通知功能。