Created
January 9, 2018 06:56
-
-
Save andrewlimaza/7dd8b5d4e3cc495f14ffa67f696252e0 to your computer and use it in GitHub Desktop.
Change body content according to level checkout for Paid Memberships Pro.
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
<?php | |
/** | |
* Change body text of email according to level checkout. | |
* Assumes level ID is 1. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_email_body( $body, $email ) { | |
if( $email->data[ 'membership_id' ] == "1" && strpos( $email->template, "checkout" ) !== false ) { | |
$body = 'Change this text to desired text.'; | |
} | |
return $body; | |
} | |
add_filter( "pmpro_email_body", "my_pmpro_email_body", 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment