Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created November 15, 2012 21:35
Show Gist options
  • Save strangerstudios/4081449 to your computer and use it in GitHub Desktop.
Save strangerstudios/4081449 to your computer and use it in GitHub Desktop.
Change Paid Memberships Pro Email Subjects
/*
Change email subjects.
The function checks $email->template and updates the subject as needed.
The email template name will be equivalent to the filenames in the /email/ folder of the PMPro plugin.
*/
function my_pmpro_email_subject($subject, $email)
{
//only checkout emails
if($email->template == "checkout_free")
{
$subject = "Thank you, " . $email->data["name"] . ", for using " . get_bloginfo("name");
}
return $subject;
}
add_filter("pmpro_email_subject", "my_pmpro_email_subject", 10, 2);
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Changing PMPro Email Subjects" at Paid Memberships Pro here: https://www.paidmembershipspro.com/changing-pmpro-email-subjects/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment