Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created January 9, 2018 06:56
Show Gist options
  • Save andrewlimaza/7dd8b5d4e3cc495f14ffa67f696252e0 to your computer and use it in GitHub Desktop.
Save andrewlimaza/7dd8b5d4e3cc495f14ffa67f696252e0 to your computer and use it in GitHub Desktop.
Change body content according to level checkout for Paid Memberships Pro.
<?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