Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Last active September 26, 2022 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save damiencarbery/975eddf9c005b4194719057059dd0723 to your computer and use it in GitHub Desktop.
Save damiencarbery/975eddf9c005b4194719057059dd0723 to your computer and use it in GitHub Desktop.
Set recovery mode email address - Change the recovery mode email address to which the fatal error emails are sent to, instead of bothering and potentially confusing the site admin. https://www.damiencarbery.com/2020/08/set-recovery-mode-email-address/
<?php
/*
Plugin Name: Change Recovery Mode Email
Plugin URI: https://www.damiencarbery.com/2020/08/set-recovery-mode-email-address/
Description: Set the recovery mode email address to which the fatal error emails are sent to, instead of bothering and potentially confusing the site admin. From: https://developer.wordpress.org/reference/hooks/recovery_mode_email/#comment-3265
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version 0.1
*/
add_filter( 'recovery_mode_email', 'dcwd_set_recovery_mode_email_to_address' );
function dcwd_set_recovery_mode_email_to_address( $email ) {
$email['to'] = 'damien@damiencarbery.com';
return $email;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment