Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewlimaza/6da70f526207f9f445e8c78548aa0458 to your computer and use it in GitHub Desktop.
Save andrewlimaza/6da70f526207f9f445e8c78548aa0458 to your computer and use it in GitHub Desktop.
my_pmpro_text_translation
<?php
/*
Change term "membership" to "subscription" for plugin generated text
*/
function my_pmpro_gettext_membership($translated_text, $text, $domain)
{
if($domain == "paid-memberships-pro")
{
$translated_text = str_replace("Membership", "Subscription", $translated_text);
$translated_text = str_replace("membership", "subscription", $translated_text);
}
return $translated_text;
}
add_filter("gettext", "my_pmpro_gettext_membership", 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment