-
-
Save femiyb/dc0431f1032740bf34eaadc4fbc7ca18 to your computer and use it in GitHub Desktop.
Change the "Reply-To" for emails sent to 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( strpos($email->template, "_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