This file contains 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 | |
/** | |
* Change the "To:" header for admin emails for Paid Memberships Pro. | |
* Follow this guide to add custom code to your site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_change_admin_to_email( $headers, $email ){ | |
if( strpos( $email->template, "_admin" ) !== false ) { | |
//add different email for admin emails. | |
$headers[] = "To: " . "[email protected]"; |