Skip to content

Instantly share code, notes, and snippets.

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