Choose when to display the Renew link to members who sign up for a membership level with an expiration date.

Use the following code recipe to display a “Renew” link on the Membership Account page at your desired period before a member’s expiration date.

"Renew" link on the PMPro Membership Account Page


About the Code Recipe

By default, when a member signs up for a membership level that has an expiration date, they will see a “Renew” link a certain number of days prior to their membership expiration date. When a member “Renews” their membership, the new period is automatically tacked on to the end of their existing membership level. The core plugin has built-in logic to determine when the “Renew” link appears based on the active member’s billing and expiration date settings.

If the member logs in to their membership account before this timeframe is triggered, they will instead see a “Change” link, allowing them to view current membership level offerings and change their membership level. This code recipe allows you to control exactly when the “Renew” link will appear for the member.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options


More about Renewals and PMPro

If you are new to PMPro, check out some of these other articles related to member renewals:

Restrict Checkout for Users with a History of Refunds

Let’s face it, dealing with refunds is an unavoidable part of your membership business. Some number of your refunds will be from legitimate users that realize they do not need or want your membership any more.

Some refunds, though, may be from abusive users who know that they can sign up, consume your membership product (whether that’s support, premium content or guides, downloads and more), then cancel and request a refund right away. If you are seeing this become a widespread problem, check out the code recipes below.


About the Code Recipe

This post includes three different recipes based on how you want to approach the restriction on a new checkout. In each case, the user will see a notice if they try to purchase membership that can be adjusted for your needs. The default message reads: Please contact us about your account to complete checkout..

  1. Restrict checkout if the LAST order was refunded,
  2. Restrict checkout if the user has ANY refunded order history,
  3. Restrict checkout if the user has ANY refunded order history, but ALLOW checkout if their LAST order was successful.

This code recipe requires a Plus Account or higher.

View Membership Options


More about Refunds and PMPro

If you are new to PMPro, check out some of these other articles related to member refunds:

Include the used and claimed Group Discount Codes in your Membership Orders export file

This recipe was so useful that we merged it into the Group Discount Codes Add On. When the Add On is activated, a “Group Code” column is added to the CSV export showing the Group Code that was used at checkout (if applicable). The regular Discount Code column will show the main/parent discount code.

You can grab the Group Discount Codes Add On that includes this feature here. If you are interested in how this works to possibly do something similar via custom code, we’ve kept the original code recipe here for reference.


About the Code Recipe

The Group Discount Codes Add On for Paid Memberships Pro allows you to see the number of times the ‘parent’ discount code was used on the Memberships > Discount Codes admin page. However, you might want to know which individual ‘child’ group discount codes have been used and by whom.

If you’re new to the Group Discount Codes Add On, it adds features to PMPro to better manage large numbers of unique discount codes with the same pricing. For example, it can be used to create a group of codes to print on promotional material, for use in a campaign with Groupon or for an email campaign.

You can use the following code recipe to add an extra CSV column called group_code to your Orders CSV download file. Inside of this new column, you will be able to see which individual group codes have been used and by which member. To access and download your Orders CSV file, navigate to your WordPress Dashboard > Memberships > Orders > Export to CSV.

We are currently working on better reports for Discount Codes in the core Paid Memberships Pro plugin as well as specialized reports for viewing activity on your Group Discount Codes. This code recipe will help membership sites already using the Group Discount Codes Add On to have better visibility of code uses. is already merged into the Add On, but you can view the code recipe below for reference. Let us know if you have any other ideas for this Add On or discount codes in general.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Restrict the display of Advanced Custom Fields (ACF) fields by Membership Level

Advanced Custom Fields PluginAdvanced Custom Fields is a popular plugin available in the WordPress.org Plugin Repository. The plugin allows you to add structured information to your posts, pages, and more.

This guide explains three primary methods to hide or show fields based on the membership requirements for the post.


Option 1: The pmpro_hasMembershipLevel() function.

Since the ACF plugin requires you to add custom PHP functions to your theme’s template files, one of the easiest ways to restrict the display of fields is to wrap your entire display in the pmpro_hasMembershipLevel() function. Here’s an example of using the function in your template files:

You can read full documentation on the pmpro_hasMembershipLevel() function here.


Option 2: The pmpro_has_membership_access() function.

Similar to the option above, this method will look to the post’s required membership levels. You won’t need to specify the level IDs when using this function, it will inherit the membership protection from the “Require Membership” metabox for that post. Here’s an example of using the function in your template files:


Option 3: The acf/format_value Filter

If you’re using version 5+ of the Advanced Custom Fields plugin, you can write a single function that will filter all fields on a member-protected page. This code will uses the acf/format_value filter to check first if the user has access to the post and will then optionally restrict the display of the field.

Note that this will not restrict the display of any custom HTML you have in your page templates, but it is a simple solution that won’t require editing all of your theme files.


If you need help altering these recipes to suit your needs, feel free to get in touch with one of our Support Engineers on our Member Support Forum.

Add a Membership Duration dropdown to Checkout and Offer a Discount for Extending Membership

Give your customers the option to select a membership duration and offer a discount for a longer term. This is a great way to collect a larger up-front payment from members and offer an incentive to pay for membership in advance.

Screenshot of the Membership Checkout page with code recipe


About the Recipe

This code will add a “Membership Duration” dropdown field to your checkout page. Once selected, the member’s expiration date and initial payment amount will be updated accordingly.

In the code recipe, there is a 20% discount when selecting a 2-year membership duration and a 25% discount for selecting a 3-year membership duration. The code recipe serves as an example for what is possible, you can alter the recipe to remove the discount or adjust the discount to suit your business.

You will need to input the Level ID that you want this code recipe to apply to. Only select membership levels that are billed on a yearly basis otherwise this will conflict with other level billing periods. Add your Membership Level ID to 'levels' => array( 8 )

This code recipe requires the Register Helper Add On to be installed and activated. If you need help altering this code to suit your needs, feel free to get in touch with one of our Support Engineers on our Member Support Forum.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Allow members to optionally exclude their profile from the Member Directory

This code will add an “Exclude my profile from the member directory” field at membership checkout when using the Member Directory and Profile Pages Add On for Paid Memberships Pro.

"Exclude my profile from the member directory" field at checkout.


About the Recipe

The Member Directory and Profile Page Add On includes functionality to allow members to remove their profile from display. This field is added by default as a field on the user’s WordPress Profile. The recipe below adds that field at membership checkout (note that this recipe requires the Register Helper Add On).


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Add a customized notification banner to alert your members of upcoming expiration.

This code recipe adds a notification banner to remind members that their account will expire within 7 days—or any custom timeframe you would like. You can use the recipes with any WordPress theme, or specifically with a membership site using Memberlite.


About the Code Recipe

By default, Paid Memberships Pro will send members an expiration email notice 7 days prior to their expiration date (by the way, if you want to add more email expiration warnings, see our Extra Expiration Warning Emails Add On).

This recipe adds an expiration warning directly on your site, reminding the logged in member that they must renew to maintain access. The banner will only be shown to a member that has an active membership level with an expiration date within the next 7 days. You won’t need to rely on email delivery, receipt, or that your member will actually read the message.

If a member decides to renew their membership by clicking the “Click here to renew membership” link, they will be redirected to the membership levels page. From here they can select their desired membership level and proceed to checkout. They will no longer see the message


This code recipe requires a Plus Account or higher.

View Membership Options

Change the wording ‘Membership’ to ‘Subscription’ for Paid Memberships Pro

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

Add text before the submit and Checkout button on the PMPro checkout page

Do you have something you want members to know about before they click the ‘Submit and Checkout’ button on your checkout page? Use this code recipe to insert some text, HTML or both before the button.


About the Recipe

This code recipe will enable you to add text/HTML immediately before the Submit and Checkout button located on the Paid Memberships Pro Checkout page. This is a great way to add a little bit of important information that you want your soon to be members to know about.

If you are thinking of using this to display your Terms and Conditions to members, please see our default Terms of Service feature found under the Advanced Settings of the plugin.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options