admin管理员组文章数量:1391981
Since WordPress 5.2 there is an automated E-Mail on PHP exceptions. In some smaller projects I just upload the files for new extensions while developing - whenever an error occurs then, the site admin is getting an email. This is usually one of my freelance customers and they unecessarily panic then.
Therefore I would like to turn of this email notifications (without changing the admin email). Is there some kind of action/filter, config option (e.g. define) to disable this behaviour? Some true/false option would be the best? Then I can disable this just for the times I develop.
Since WordPress 5.2 there is an automated E-Mail on PHP exceptions. In some smaller projects I just upload the files for new extensions while developing - whenever an error occurs then, the site admin is getting an email. This is usually one of my freelance customers and they unecessarily panic then.
Therefore I would like to turn of this email notifications (without changing the admin email). Is there some kind of action/filter, config option (e.g. define) to disable this behaviour? Some true/false option would be the best? Then I can disable this just for the times I develop.
Share Improve this question edited Jul 5, 2019 at 15:19 Blackbam asked Jul 5, 2019 at 14:53 BlackbamBlackbam 57511 silver badges28 bronze badges 3 |2 Answers
Reset to default 6There was some discussion on it a few weeks ago you can find here: https://make.wordpress/core/2019/04/16/fatal-error-recovery-mode-in-5-2/
According to that and looking through the core, you can accomplish that with one of two methods:
define('RECOVERY_MODE_EMAIL', '[email protected]');
OR
add_filter( 'recovery_mode_email', 'recovery_email_update', 10, 2 );
function recovery_email_update( $email, $url ) {
$email['to'] = '[email protected]';
return $email;
}
Hope that helps!!
I have thoroughly tested the above suggestions and neither of them work.
The only thing I have found that DOES work is adding the following to "wp-config.php":
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);
本文标签: emailHow to disable automated EMail on PHP errorexception
版权声明:本文标题:email - How to disable automated E-Mail on PHP errorexception? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744658495a2618099.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
WP_DISABLE_FATAL_ERROR_HANDLER
should deactivate the whole thing – kero Commented Jul 5, 2019 at 15:56