Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change the text "Membership" to "Package" whever it appears in PMPro.
/*
Change the text "Membership" to "Package" whever it appears in PMPro.
Add this code to a custom plugin.
*/
function my_gettext_membership_to_package( $translated_text, $text, $domain )
{
if($domain == "pmpro" || $domain == "paid-memberships-pro") {
$translated_text = str_replace('Membership', 'Package', $translated_text);
$translated_text = str_replace('membership', 'package', $translated_text);
//can add additional translations here
}
return $translated_text;
}
add_filter('gettext', 'my_gettext_membership_to_package', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.