Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LMNTL/c3ec63f9b1ea1f91a10bae6796f27e2f to your computer and use it in GitHub Desktop.
Save LMNTL/c3ec63f9b1ea1f91a10bae6796f27e2f 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment