-
-
Save LMNTL/c3ec63f9b1ea1f91a10bae6796f27e2f to your computer and use it in GitHub Desktop.
Change Paid Memberships Pro Email Subjects
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
/* | |
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