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

Offer Expired and “Old” Members a Membership Renewal Discount for Coming Back

You’re constantly improving your membership site features – now it’s time to let your expired members know about all the new stuff they are missing! Here are a few methods to sweeten the deal and give expired and “old” members a monetary incentive to renew.

Code Recipe #1 – Automatic Resubscribe Discount for Expired Members

This recipe sets an automatic discount for a returning member who has let their membership expire. There are many ways to customize this example – but for this case it gives a 50% discount on the initial payment when an expired member purchases the same level previously held.

This code recipe requires a PMPro Plus Account or higher.

View Membership Options

Code Recipe #2 – Set a Discount Code for “Old Members” Only

This recipe allows you define a discount code for old members – and excludes someone who has cancelled, has an active membership or has never been a member from taking advantage of the discount.

Setting your discount is a bit simpler with this method (it uses the familiar Memberships > Discount Codes admin page to modify the price an “old member” pays to come back without too much coding). The discount code is automatically applied at checkout for a member that fits the “old member” criteria. Optionally use the shortcode [oudc] to show a link to membership checkout with the code applied. Just update line 50 with your specific level ID and messaging.

This code recipe requires a PMPro Plus Account or higher.

View Membership Options

Now, tell your expired members about the deal!

Export a CSV list of expired members via the Memberships > Members List admin page. You can email this list directly through your business email account via BCC.

Or, if you are using an email marketing service like MailChimp, I’d suggest importing the list to that service with a custom field “Expired” set to “Yes”. Then you can segment the group and target them individually with your promotion.

Want a different type of discount or promotion for expired members?

Open a topic in our member forums for help customizing with your unique renewal pricing, such as:

  • A different discount percentage;
  • A fixed dollar amount adjustment;
  • A discount on the recurring portion;
  • A discount that only applies to a specific membership level(s);
  • A discount for an expired member on upgrade to another level.

Translate Your Membership Level Names with Paid Memberships Pro

The code recipe below filters membership level names and translates them into your site’s offered languages. This works well in conjunction with WPML for multilinguial sites.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Sell Access to Post Categories “à la carte” Using Price-Adjusting Register Helper Fields

We blogged previously about synchronizing a post category with the purchase of an Addon Package.

This new recipe uses price-adjusting fields added via Register Helper to allow members to purchase individual post categories. And—unlike the previous method—this approach can update the recurring membership price.


This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Modify Level Price at Checkout Based on User-Selections

Use this code recipe in combination with the Register Helper add on to have checkout fields that adjust membership price, either for the initial payment, recurring payments, or both.

Why would I want to do this?

There are several use-cases that need this type of option that change’s your level’s price. Some ideas, to name a few:

  • An association that publishes a quarterly magazine. Allow members to optionally pay extra to receive a physical copy via mail.
  • A food-box or equivalent that has a frequency or quality selection, such as daily or 3 times a week OR good, better, and best.
  • A health coach who wants to add an optional “weekly call” with the client.
  • An education or online learning site that allows you to select one or more additional courses in your membership.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Provide a discount for early membership renewal

Give your members an incentive for renewing early – automatically adjust the price of a membership renewal with no discount code required. According to the 2012 Membership Marketing Benchmarking Report, “Associations that offer an early renewal discount were more likely to see an increase in renewal rates over the past year (24% to 19%).” To read the full report, and reports from other years, visit The code allows you to specify – for each specific level – the early renewal price. Note that by default all membership renewals (when a member purchases the same level they currently have) extend the user’s membership from their existing expiration date (i.e. if they are set to expire on May 1, 2015 and renew for one year on March 1, 2015, their new expiration date is May 2, 2016). Customize and add this code to your theme’s functions.php file or a helper PMPro Customizations plugin (our recommended method). Note: Line 12 of this code gist illustrates a way to adjust more than just the renewal price. You can also adjust the term of the renewal, set to never expire and allow a “lifetime” membership renewal, and more. Post a topic on the…

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Multiple Membership Levels Per User with PMPro (The Workarounds)

The current version of Paid Memberships Pro only allows users to have One Membership Level Per User at a time.

If a member checks out for a different membership level, their previous level is cancelled (any attached recurring subscriptions are cancelled) and they are given the new level.

Having just one level per user makes sense for a certain kind of membership site where different levels are basically upgrades or downgrades around one featured product. This is the user case PMPro was initially developed for.

However, some sites would benefit from allowing their users to purchase multiple membership levels at the same time or over time to add additional subscriptions to their one WP user account. The clearest example of this is an E-Learning type site where each membership level corresponds to a “course” on the site with users able to purchase one or more courses concurrently.

This is not about a new version of Paid Memberships Pro.

Work to allow users to purchase multiple memberships was started in 2013, but we have sidelined that work until further notice and a very alpha version of Multiple Memberships Per User as an Add On is now live on a few sites..

Update: The Multiple Memberships per User Add On is in Beta and available on GitHub. The Add On works well with the core PMPRo plugin, however most of our other Add Ons still need to be updated to respect the fact that users can have more than one membership level at a time. This work will take one to two years at least. Feel free to use the MMPU add on in the meantime, but also take a look at the work arounds below which often work as well or better than using the add on.

This post is about the different ways to work around having multiple memberships per user with the current version of Paid Memberships Pro.

Work Around 1: Use the Addon Packages Plugin

If you only need to support one time payments for access to each course/package/level/whatever, then you can use the Addon Packages plugin in lieu of regular membership levels.

View the Addon Packages Plugin

The basic steps to use PMPro Addon Packages for multiple membership levels would be:

  1. Setup a free membership level or paid “base” level for your members.
  2. Create a basic WordPress page for each course/level/package/etc.
  3. Enter the one time price for each page in the PMPro Addon Packages settings for the pages.
  4. Direct customers to the page which will have a link to checkout for the addon package.
  5. To lock down related content use the pmproap_hasAccess($user_id, $post_id) function in your code to check if $user_id has purchased access to $post_id.

This post describes how to sync Paid Memberships Pro with WP Courseware using Addon Packages with a page setup for each course. (This works independent of the official PMPro for WP Courseware bridge plugin.)

Work Around 2: Adding Fields to Checkout

Instead of having a separate membership level for each offering, you can have one main membership level (or a few based on other factors) and add a checkbox or other field to checkout for members to opt into each course or individual offering.

You can add fields using the PMPro Register Helper plugin API and then use code like this to adjust the price of your level at checkout based on the values of the fields:

Then you can use code like the following to check for the user meta value set by that field when handling access.

With a little bit of programming, you could even automate parts of this. Here is the outline of a nifty plugin to automate some of this:

  1. Add at least one core membership level.
  2. Add additional membership levels to be used as “options” at checkout for the main level. Mark the level as hidden.
  3. Use code to lookup all hidden levels (or a specific set of level ids) to create a PMPro Register Helper field at checkout for the main level.
  4. Upon checkout, adjust the cost of the main level based on the cost of the hidden option levels checked at checkout.
  5. Hook into the pmpro_has_membership_level filter to look if a user has the corresponding user meta for the field specified vs actually being a member of that level in PMPro.
  6. Similarly, hook into the pmpro_has_membership_access_filter filter to check those user meta fields in addition to the values in the pmpro_memberships_users table.

Many other addons or bits of code may still be confused about what “levels” a member has when for instance figuring out which mailing lists to subscribe a member to. And you might have to tweak some more code to handling these cases based on your setup. (This is why adding this functionality to core is so hard.) But this is the gist of how you can go about allowing multiple membership levels on a specific setup.

Work Around 3: Setup a Multisite Network

When running Paid Memberships Pro on a multisite network, each blog/site that PMPro activated on will have its own set of levels and members. So users in the network can have a membership on site A and a different membership on site B.

In some cases it might make sense to simply setup a new site for each membership offering rather than putting multiple offerings on the same WordPress site.

Setting up and running a multisite network is not always an easy thing to do. So if you don’t have other reasons for wanting to go with multisite, you might want to avoid doing this only to be able to offering multiple memberships.

Have All Members Expire on a Set Date

Here is a bit of code you can use to have all of your customers memberships expire on the same day. For example, you may want your memberships to roll over on January 1 no matter when someone signs up.

Create a normal level that expires after “1 Year”. Then copy this code into your active theme’s functions.php or into a custom pmpro-customization.php plugin. Edit line 13 to set the expiration dates for your levels. Elements in the array should use the format “level_id” => “YYYY-MM-DD”.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »