Skip to content

Instantly share code, notes, and snippets.

@pbrocks
Last active July 5, 2018 19:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pbrocks/eef193d06d149920ff10707d2c069482 to your computer and use it in GitHub Desktop.
Save pbrocks/eef193d06d149920ff10707d2c069482 to your computer and use it in GitHub Desktop.
Add this your customizations plugin to alter text for PMPro Add On Packages.
<?php
/**
* Add to PMPro Customizations plugin. Be sure not to include the opening php tag in line 1.
*
* Add this your customizations plugin to alter text for PMPro Add On Packages.
*/
add_action( 'pmpro_invoice_bullets_top', 'pmproap_pmpro_invoice_links_top' );
add_action( 'pmpro_invoice_bullets_top', 'pmproap_pmpro_member_links_top' );
function pmproap_pmpro_invoice_links_top() {
$invoice_title = 'Purchased Add Ons';
echo '<h3>' . $invoice_title . '</h3>';
}
function tonys_gettext_pmproap_changes( $translated_text, $text, $domain ) {
if ( 'paid-memberships-pro' == $domain ) {
$translated_text = str_replace( 'Membership Level', 'Add On Level Purchase', $translated_text );
$translated_text = str_replace( 'membership level', 'add on purchase', $translated_text );
$translated_text = str_replace( 'membership', 'add on purchase', $translated_text );
$translated_text = str_replace( 'Membership', 'Add On Purchase', $translated_text );
}
return $translated_text;
}
add_filter( 'gettext', 'tonys_gettext_pmproap_changes', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment