-
-
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.
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 | |
/** | |
* 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