Created
May 17, 2019 16:18
-
-
Save kimcoleman/3e401e6848abd5e4ceca80298c4521b6 to your computer and use it in GitHub Desktop.
Modify the text of the login link in all membership checkout confirmation emails.
This file contains hidden or 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
<?php | |
/** | |
* Modify the text of the login link in all membership checkout confirmation emails. | |
* | |
*/ | |
function my_pmpro_email_custom_login_link_text( $body, $email ) { | |
// Only filter checkout emails. | |
if ( strpos( $email->template, 'checkout' ) !== false ) { | |
// Change text "Log in to your membership account here:" to "Log in to get started:". | |
$body = str_replace( 'your membership account here', 'get started', $body ); | |
} | |
return $body; | |
} | |
add_filter( 'pmpro_email_body', 'my_pmpro_email_custom_login_link_text', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Filtering PMPro Emails" at Paid Memberships Pro here: https://www.paidmembershipspro.com/filtering-pmpro-emails/