Created
October 14, 2019 14:04
-
-
Save andrewlimaza/512ddc1b5afc1d10b2811a08047241e9 to your computer and use it in GitHub Desktop.
Change the "Reply-To" for cancelled emails admin [Paid Memberships Pro]
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 | |
/** | |
* Add this code to your PMPro Customizations Plugin or via a code snippets plugin. | |
*/ | |
function my_pmpro_adjust_reply_to_email( $headers, $email ) { | |
// Add "Reply-To" header and set it to the user that just cancelled. | |
if ( $email->template === 'cancel_admin' ) { | |
$headers[] = "Reply-To: " . $email->data['user_email']; | |
} | |
return $headers; | |
} | |
add_filter( 'pmpro_email_headers', 'my_pmpro_adjust_reply_to_email', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment