Version 18.104.22.168 of Paid Memberships Pro is out with a handful of bug fixes and enhancements.
About the Update
In this update, a specific bug with the Braintree webhook has been fixed which may have resulted in out of sync subscriptions and/or missing orders for recurring payments.
Upgrading to version 22.214.171.124 will fix this issue for new users and recurring orders going forward. We are working on a script to fix subscriptions that may have gone out of sync (i.e. cancel memberships for users who stopped paying last month) and find orders that didn’t make it into the PMPro database. When this script is available, we will update this post and send out another update to let you all know about that.
Version 126.96.36.199 of Paid Memberships Pro is out with a handful of bug fixes. Included are fixes for Theme My Login 7, Stripe and TwoCheckout integration, and a few others.
About the Update
In addition to the improvements mentioned above, we added some SQL escaping to our reports pages. While this work is marked as a SECURITY update, we do not believe there were any related vulnerabilities in the prior code. It’s just good practice to be extra cautious here to harden the code for future updates.
In addition to the PMPro team, this update includes work by many third party authors including Jeff Farthing, Charl P. Botha, and David Cervantes Caballero.
About the Level Description and Confirmation Message
As of version 188.8.131.52, we are no longer using the WordPress the_content filter when displaying the membership level’s description or confirmation message. Using the the_content filter in these areas allowed you to use shortcodes and other post styling that relied on that filter. However, some sites (depending on the other plugins installed) would get caught in an infinite loop while rendering this text and crash. If you need to revert your site, please copy and paste this code recipe into a helper PMPro Customizations plugin.
Note that these filters only affect the level description and confirmation message when displayed on your site. If your level description or confirmation message appear in emails to your members, shortcodes and other styles may not work even with the above gist installed.
The full list of updates is below.
SECURITY: Some values used in SQL queries in our reporting code were sanitized but not later escaped via esc_sql(). All variables added to SQL queries in the reports are now wrapped in esc_sql(). The previous code was not vulnerable to any known attack, but this change hardens the code against vulnerabilities in the case other parts of the code change in the future.
BUG FIX: Fixed issue with lost passwords when Theme My Login 7 is active. (Thanks, Jeff Farthing)
BUG FIX: No longer sending an “error canceling the subscription” email when subscriptions are cancelled from Stripe.
BUG FIX: Fixed issue where TwoCheckout orders were not correctly updating the TOS consent data. (Thanks, Charl P. Botha)
BUG FIX: Fixed issue where privacy function weren’t defaulting to $current_user correctly. In practice, we were always passing a user_id anyway.
BUG FIX/ENHANCEMENT: Changed the confirmation message to use wpautop() instead of apply_filters('the_content'). If you were relying on shortcodes or other content that required that filter, you must use the custom functions outlined earlier in this post to revert this for your site.
BUG FIX/ENHANCEMENT: Using the strict parameter of sanitize_user when getting usernames. This will prevent some special characters from being used in usernames at checkout. This is inline with WP core and other plugins. (Thanks, David Cervantes Caballero).
ENHANCEMENT: Added a breakdown of orders at each price point to the Sales Report widget.
ENHANCEMENT: Showing the Stripe version we use on the Payment Settings page.
ENHANCEMENT: Updated Copyright date and GPLv2 link in license.txt.
This guide covers some of the most common pricing models for membership sites and how to configure level pricing for your site. It’s a useful guide if you’re just getting started with Paid Memberships Pro and would like to learn the different ways you can potentially charge members.
How to set up your Membership Level Pricing
Paid Memberships Pro enables you to charge your members in a variety of ways, including:
Set up a one-time/one-time “lifetime” payment for membership.
Bill members on a recurring monthly subscription.
Charge members on a yearly basis.
Set up a trial for your members before having them commit to a full membership.
You can offer all of these pricing models and more using Paid Memberships Pro. Below are a few of the most common pricing options we have seen.
Once Paid Memberships Pro is installed on your site, the following settings can be configured in your WordPress Dashboard under Memberships > Membership Levels > Add New Level:
Setting up a once-off payment.
Here are the steps to create a one-time payment that will charge members when they signup for a membership. The membership can last indefinitely or for a specific amount of time.
Set the amount you want to charge immediately at checkout in the “Initial Payment” field.
If necessary, add a Membership Expiration to this level by clicking on the Membership Expiration checkbox (more on this later). If left blank, members will be able to access members-only content indefinitely.
Save your Settings
Pro Tip: Sell access to individual pages or posts, or sell a la carte items for a flat fee by using our AddOn Packages Plugin.
Setting up a monthly payment.
To charge monthly for your site’s membership, do the following:
Set your initial payment to the amount you want to collect immediately when a member completes a checkout on your site. This can be the same amount you plan to charge on a recurring basis or it can be a higher or lower amount.
Select the “Recurring Subscription” checkbox to open up more billing options.
Set the Billing Amount and the Billing Frequency. If you want to bill clients monthly be sure to set your frequency to “1” per “Month(s)”
Save your Settings.
Setting up annual payments.
To set up a yearly pricing model for your membership level, do the following:
Set the amount you want to charge immediately at checkout in the “Initial Payment” field. Again, you can set this first payment to be a higher or lower price than you plan to charge for subsequent years.
Select the “Recurring Subscription” checkbox to open up more billing options.
Set the Billing Amount and frequency. If you want to bill clients yearly be sure to set your frequency to “1” per “Year(s)”
Save your Settings.
Setting up a membership level with an expiration date.
In some cases, you may want to add an expiration date to your Membership Level, if you would like to add an expiration date to your level, do the following:
Navigate to Memberships > Memberships Level in the WordPress Dashboard
Select a Membership Level to edit.
In the Membership Level Settings, check the “Membership Expiration” checkbox to open up the Membership Expiration options.
Set the duration of the membership access. For example, “3 Month(s)”
If you’re using widgets on your WordPress site and want to customize them for members and non-members, check out the recipes below. We’ll provide a way to filter an entire widget area for members-only, as well as a recipe to hide a specific widget instance based on the current user’s membership level.
Hide an Entire Widget Area
The following recipe allows you to define dynamic sidebars (by sidebar ID) to hide or show based on the membership requirements of the active post ID. Any widgets placed in the filtered widget areas will not show if the current user does not have access to the post ID.
This code recipe requires a Plus Account or higher.
To discover the sidebar ID, you can look in your theme files to locate where the dynamic_sidebar is displayed.
Hide a Specific Widget Instance
The following recipe allows you to hide specific widget instances (regardless of the widget area they are placed in) based on the current user’s membership level. This code recipe can be extended for several membership level checks based on your needs.
This code recipe requires a Plus Account or higher.
Page builders are a popular way to create a more visually appealing user experience on your site. Many Paid Memberships Pro users are confused with how to properly use these tools alongside the required shortcodes on various pages of your membership site, such as the pricing page or membership account page.
Below are a list of common issues we see when trying to use Paid Memberships Pro with a page builder.
Required page shortcodes don’t render.
The main issue that we see related to Page Builders is that default page shortcodes, such as [pmpro_levels] or [pmpro_account], don’t render. You’ll know you are experiencing this issue if you go through the Initial Plugin Setup, then click to view your “Membership Pricing” page and see something like this:
Not all of the Paid Memberships Pro shortcodes will render as actual content when using a live editing experience. I have seen different behavior among all of the builders I tested. The best way to ensure the page is loading properly is to save and publish your content then view the page on the frontend.
If the shortcode still isn’t rendering, make sure you are using your builder’s standard text or shortcode widget/component/block for the page’s required shortcode. I have seen cases where the builder places your page’s shortcode in a special block type that will not render shortcodes. Here’s a list of all required shortcodes for your Membership pages.
“Live Editors” don’t load or redirect to the “Membership Levels” page.
This issue is present if you try to edit a page like the “Membership Account” page in a “Live Editor” experience, but the editor redirects you to the Membership Levels page. To resolve this, you must make sure that your administrator account has a membership level. This is due to a conflict where the builder is trying to offer a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.
Members-only content isn’t protected.
Because Page Builders rely heavily on their own logic to render page layouts, sometimes the builder’s content filters run later than the Paid Memberships Pro filter. This can result in protected content being public. The solution to this issue has been covered previously in this article, which outlines how to run the Paid Memberships Pro content filters with a higher priority (after the builder has done its content-formatting magic).
The Membership Checkout page relies on a level ID being passed through the URL (usually from the Membership Levels page) in order to display the appropriate level details at checkout. When using a live preview or editor experience, there is no level ID passed in the URL so the page either fails to load or redirects to the Membership Levels page. You can resolve this by adding a Custom Field with the key or name pmpro_default_level and value of any valid level ID. This allows the “Live Editor” to locate a level for the preview page. Now your Membership Checkout page’s live editor can draw in some level’s content and allow the preview.
I don’t see the “Restrict Membership” box on the editor.
If your page builder uses a live editing format, chances are that the “Restrict Membership” metabox is not part of this editing experience. After you have made your page design and content changes via your builder’s editor, you will need to also edit the post with the WordPress editor and select the appropriate membership levels to restrict access. Read this guide for more help on restricting content using Paid Memberships Pro.
All of the above issues have a solution, so please don’t panic. We are looking for ways to build support into our plugin for popular open source page builders. For now, we’ve tested Paid Memberships Pro compatibility with the list of Page Builders below. These were tested on a fresh WordPress site with only the core Paid Memberships Pro plugin, the Twenty Sixteen WordPress Theme and using only that specific Page Builder. If you are using another open source page builder, please post a comment below and we will test which combination of solutions are needed to make the two plugins compatible.
This builder is one of the most popular open source builders available via the WordPress.org Repository. In my testing, I have found that you need to modify a few of the ways our core plugin renders content in order to ensure compatibility with SiteOrigin’s builder. The code recipe below should be included in a plugin for PMPro Customizations.
In this recipe, we are removing some content filters we add to your site’s level descriptions and confirmation messages, as they were causing issues when the builder attempted to render the membership checkout and confirmation page shortcodes.
When editing the Membership Checkout page, you must set a Custom Field on the Membership Checkout page with the key pmpro_default_level and value of any valid level ID. This allows the “Live Editor” to locate a level for the preview page.
You must also make sure that your administrator account has a membership level in order to use the “Live Editor” experience. This is due to the fact that the Page Builder by SiteOrigin editor is trying to offer you a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.
This builder is gaining popularity very quickly and its easy to see why. Because Elementor is a drag & drop live editor, there are some special considerations you need to make specifically when attempting to use the builder to edit your Membership Checkout page. When editing the Membership Checkout page, you must set a Custom Field on the Membership Checkout page with the key pmpro_default_level and value of any valid level ID. This allows the live preview editor to locate a level for the preview page. This step must be done before you convert to editing the page with the live preview.
You must also make sure that your administrator account has a membership level in order to use the “Edit with Elementor” experience. This is due to the fact that the Elementor editor is trying to offer you a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.
You must also add a custom code recipe that filters your content later as well as removes the default content filters our plugin uses on your site’s level description and confirmation messages. The code recipe below should be included in a plugin for PMPro Customizations.
Beaver Builder offers a live editing experience for WordPress and premium versions offer pre-built templates and layouts which make it simple to design well thought out content. In my testing it was one of the most intuitive builders in this list. There are a few steps to take to ensure compatibility with Beaver Builder. The code recipe below should be included in a plugin for PMPro Customizations.
When editing the Membership Checkout page, you must first set a Custom Field with the key pmpro_default_level and value of any valid level ID. This step must be done before you convert to editing the page with Beaver Builder. This allows the live preview editor to locate a level for the preview page.
You must also make sure that your administrator account has a membership level in order to use the live editor experience. This is due to the fact that the Beaver Builder editor is trying to offer you a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.
You must also add a custom code recipe that filters your content later. This allows Beaver Builder to process all the layout-related filters on your content, then allows Paid Memberships Pro to apply appropriate membership restrictions. The code recipe below should be included in a plugin for PMPro Customizations.
More about Page Builder Compatibility
I have also seen some funny behavior specifically if you had generated the PMPro pages prior to activating the Page Builder. If your builder isn’t playing nicely with our shortcodes, try to open the page in the builder’s editor then save the page. For some reason this occasionally resolves the issue and then your shortcode will render.
Edit each Page under Memberships > Page Settings.
Swap to your builder’s rich page editing experience.
Make sure the appropriate page’s shortcode is in the editor.
Save the page.
Using another Page Builder?
If we didn’t cover the builder you are using or if you have Page Builder-like features as part of your theme, post a comment below and we will try to test it and work out a solution. We are only able to offer compatibility testing if the builder you are using is also open source, like Paid Memberships Pro and the page builders mentioned in this post.
This post recaps the Paid Memberships Pro Add Ons recently updated. Plus or Unlimited members can upgrade through their WordPress dashboard under Dashboard > Updates or Memberships > Add Ons. Be sure to backup your site before performing updates.
This Add On adds the ‘Require Membership’ meta box to all CPTs selected and redirects non-members to the selected page.
v.2.1 of the Add On fixes a bug with redirects when no CPTs were selected on the settings page but the is_singular check was still returning true. This resulted in ALL single content posts and pages being redirected.
This plugin will help to manage grouped discount codes or large numbers of unique discount codes with the same pricing.
v.3.1 and v.3.2 of the plugin add features related to viewing individual group code activity. The release adds a “Group Code Uses” column to the Memberships > Discount Codes page. This column will now show a sum of child codes that have been used. The release also adds a “Group Code” column to the Memberships > Orders CSV export.
This Add On adds a “delay” field to membership levels and discount codes, allowing you to set a variable-length period between your initial payment (if required) and recurring subscription payment.
v.4.6 of the Add On fixes a bug where an invalid startdate was returned from pmpro_profile_start_date filter handler. This resulted in double payments at checkout for levels that had no subscription delay set.
This plugin aggregates several features for integrating your Membership site with WooCommerce to sell Memberships as a product, set a global % discount on products by level or set a per-product members-only price. Several updates have been made to the Add On through v1.6.1, including:
BUG FIX: Fixed fatal error in pmprowoo_get_membership_products_from_order() that was happening on some systems.
ENHANCEMENT: Localization/GlotPress support.
BUG FIX: Fixed bug when deselecting the autocomplete option on a membership product.
BUG FIX: Now checking if a user has a different subscription linked to their membership level before removing a user’s membership level. Users switching between subscriptions for the same level would have their level removed. (Thanks, Ted Barnett)
BUG FIX: Fixed issues when a product with a sale price also has membership pricing.
BUG FIX/ENHANCEMENT: Updated to work with the latest versions of WooCommerce (3.4.2) and WooCommerce Subscriptions (2.2.22).
ENHANCEMENT: Added a filter pmprowoo_get_membership_price, which can be used to support variable products via custom code (like this)
ENHANCEMENT: Added support for PMPro Multiple Memberships per User.
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..
Restrict checkout if the LAST order was refunded,
Restrict checkout if the user has ANY refunded order history,
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.
We have long recommended Theme My Login as a very useful plugin for sites running Paid Memberships Pro. With features including themed login, frontend user profiles, and simple redirection rules, we found TML to be a great addition for any membership site. We recommended it to 100% of our users and included it in our WordPress bundle.
With the release of version 7.0+ of Theme My Login, several key features that were once included in the WordPress.org repository version of the plugin are now offered as premium extensions. This post details some short and long term options for membership site owners concerned about the changes and the best steps to take.
Themed login pages are still part of the free plugin.
If you were only using Theme My Login to show your login form on the frontend of your website and not using any of the “modules” that came with the plugin, then you are fine and can continue to use Theme My Login as you were before. Make sure that you are upgraded to the latest version of Paid Memberships Pro as well, which included a fix so PMPro will still redirect the registration page to the PMPro levels page and handle login redirects properly.
If you can afford it, purchase the Theme My Login extensions bundle after upgrading.
Theme My Login is a solid plugin maintained by a great developer, Jeff Farthing. Support Jeff and your site by purchasing the premium extensions you need.
Currently you can purchase extensions a la carte for $10 each or a bundle of all 6 legacy extensions for $49.99. Jeff has kindly given us a discount code to share with our members to receive 20% off any extension purchase, including the bundle. Just type in “PMPRO” on the checkout page to apply the 20% discount. This code will work through the end of July 2018.
After upgrading you may have to redo some settings.
We purchased the bundle ourselves and were able to get our themed login and profile pages back online in a few minutes. We did have to redo a few of the settings though. Here are a few notes we took during the upgrade that might help:
When we installed the Redirections extension, all of our redirection rules all migrated properly upon upgrade.
When we installed the Themed Profiles extension, our settings were reset to the default. We typically recommend checking the box to theme profiles for the Subscriber role and checking the box to keep Subscribers out of the dashboard.
The default Login, Register, Password Reset, and Profile pages are no longer editable as pages. However, we were able to take our “your-profile” page, keep the [theme-my-login] shortcode on the page, and then change the slug in the main TML settings to “your-profile”. Now the profile page has the template, sidebar, and other settings we want for that page.
The PMPro Member Homepages add on is a good substitute for the TML login redirect module.
One of the TML modules allowed you to select a different page to be redirected to after logging in based on the user’s role. This way you could have subscribers redirected to one page and admins redirected to another.
If you don’t need to redirect users based on roles, you can redirect them based on their membership level instead using our Member Homepages add on.
In the short term, you can keep using version 6.4 of TML
While its always smart to keep your WordPress plugins up to date for security considerations, in the short term you can keep version 6.4 of TML active. The plugin won’t allow you to update in the WP dashboard unless you read the notice on the settings page and change a setting to approve the upgrade to version 7.0.
Version 6.4 TML is likely to work for a while until a core update to WordPress changes something about the login system that breaks it. We highly recommend upgrading to TML 7.0+ as soon as possible, but you have some time to figure things out.
Improving Paid Memberships Pro with Added Profile Features
The new business model for Theme My Login is a good move for Jeff and will help him to build a business around the plugin that will ensure the plugin continues to be maintained and supported. We like plugins that do their one thing really well, and we’ve been happy with Theme My Login over the years. I’d rather not use our limited development time to build functionality covered by other competent plugins. On the other hand, the cost of the extensions are going to keep some PMPro users from installing Theme My Login. This factors into our decisions around what features we build into the core PMPro plugin, build into our Add Ons, or reserve for third party plugins.
In the long term, we are looking into moving the themed login and profile page features into the core PMPro plugin or possibly an Add On of our own. We are in the early stages of discussion and will start from first principles to figure out what kind of solution will be best for our users.
Versions 184.108.40.206 and 220.127.116.11 of Paid Memberships Pro are out with just two bug fixes. Version 18.104.22.168 fixes compatibility with Theme My Login. Version 22.214.171.124 fixes an issue (we tried and failed to fix in 126.96.36.199) where existing members who checked out for their same level with PayPal Standard would have their levels expire from the checkout date instead of being extended based on their existing level.
In mid-2017, WordPress.com began to offer a Business Plan. Sites on this plan pay an annual fee to unlock various features, specifically the ability to install any theme or plugin from the WordPress.org repository (prior to this, sites could only activate a specific set of plugins). This means that WordPress.com sites could finally run Paid Memberships Pro. Pretty neat. Or not.
While it is possible to activate the Paid Memberships Pro plugin on a Business Plan, we do not recommend running PMPro or any of our Add Ons on a WordPress.com account. The main issue is that even business plans cannot SFTP into their sites or edit the plugin files in any way. This is a problem for 2 reasons.
PMPro is a complicated plugin with unpredictable dependencies on other plugins and themes. If PMPro is not playing nice with another plugin or theme on your WordPress.com setup, maybe even causing a fatal error that crashes your site, you will not be able to edit your site files to debug the issue.
We expect most membership sites to require custom code to function properly. While we aim to make our Add Ons as user friendly as possible and improve them all as time goes on, more than most other plugins we encourage our users to hire developers to tweak their membership sites using custom code. This isn’t possible on WordPress.com.
Again, it is possible to activate Paid Memberships Pro, and there are likely many users successfully running it on the WordPress.com Business Plan. I just want to make it clear that until WordPress.com offers SFTP or a viable alternative, I’d rather not have people get setup on PMPro only to run into a need or support issue that would require customization or debugging.