Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change the "Reply-To" for emails sent to admin [Paid Memberships Pro]
<?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