Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsjusteileen/03b9afc0047cfe80811f2ca6857b967f to your computer and use it in GitHub Desktop.
Save itsjusteileen/03b9afc0047cfe80811f2ca6857b967f 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