This is a simple code recipe that will allow you to change the wording “Membership” to “Subscription” for Paid Memberships Pro.


About the Recipe

Depending on where your target membership audience lives or the type and location of your business, the word “Subscription” might be more familiar than “Membership”. The code recipe below uses the WordPress gettext filter to translate the word “Membership” to “Subscription” throughout the Paid Memberships Pro Plugin.

If you would like to change the word “Membership” to something else, you can do so by editing the code of this recipe by replacing “Subscription” with your desired label. If you are a Paid Membership Pro Plus Member and need some help with this, please reach out to us on our Member Support Forums.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options


Author’s gravatar

Well, I put it in the paid-memberships-pro.php document and it seems to have worked! Thank you!

Reply
Author’s gravatar

You should never edit any file in the /wp-content/plugins/paid-memberships-pro/ directory. Doing so could break the PMPro plugin and/or keep you from upgrading this plugin in the future. We regularly release updates to the plugin, including important security fixes and new features. You want to be able to upgrade – and if you do so any edit you made will be overwritten.

Reply
Author’s gravatar

Great post. I have a question. If I want to use Plan instead of subscription. Should I change the word in these 2 lines only?

$translated_text = str_replace(“Membership”, “Subscription”, $translated_text);
$translated_text = str_replace(“membership”, “Subscription”, $translated_text);

Thanks!

Reply
Author’s gravatar

I tried this to replace “Pay by Check” because it’s not clear to all our customers that this is (at least on our website) paying via banktransfer. However, it doesn’t seem to work – nothing changes. Any advice?

Reply
Author’s gravatar

We can help troubleshoot this via the members forum – if you are trying to use this method for an addon its possible a different text domain is being used and would need a slightly altered statement.

Reply
Author’s gravatar

How do I change a single text string? This code recipe is useful for global changes, but what if I just need to change one text string in Sponsored Members Add On? People signing up with the sponsored group code will sign up free, so I want to change the wording that appears on the checkout page from “Do you have a discount code? Click here to enter your discount code.” to something like “Do you have a signup code from your Club Manager? Click here to enter your signup code.” I don’t want to do a global change in case the “Discount” string is used for other discount coupons, etc. And of course the second part of the text string is an embedded link which must functionally remain as is.

Reply
Author’s gravatar

You can add code to check what page you are on before changing the text. So something like this at the top of the function:

`
global $pmpro_pages;
if(!is_page($pmpro_pages[‘checkout’])) return $translated_text;
`

Reply
Author’s gravatar

Thanks Jason. I have 5 different membership levels. Is there a way to also check which membership level the checkout page is for, so if I only want to change the text on the checkout page of membership level 5?

Reply
Author’s gravatar

You can check the global $pmpro_level value.

So add $pmpro_level to your globals declared in the function, then you can check the membership level like:

if($pmpro_level->id == 1) { … }

If you post to our member forums with all the info needed, we can code this up for you.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *