Last active
February 24, 2021 12:52
-
-
Save femiyb/a692dceb01e96e449a17f89e821aa580 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This sends PMPro admin emails to another email. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
//Change PMPro admin email | |
function my_pmpro_forward_admin_emails($recipient, $email) | |
{ | |
if(strpos($email->template, '_admin')) | |
$recipient = '[email protected]'; | |
return $recipient; | |
} | |
add_filter("pmpro_email_recipient", "my_pmpro_forward_admin_emails", 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment