PMPro Update 1.9.5.5

Version 1.9.5.5 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 1.9.5.5 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.


Please update Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.9.5.5 specifically here.


The full list of updates is below.

  • BUG FIX: Fixed fatal error in the Braintree webhook that will have caused syncing issues for Braintree users.
  • BUG FIX: Stopped sending the cancel subscription request to the PayPal API if we are processing the IPN request for the same subscription.
  • BUG FIX: Fixed issue where the Stripe API version was shown for non-Stripe gateways on the payment settings page.
  • BUG FIX: Using self:: instead of static:: in the Stripe class that could keep the pmpro_stripe_customerid from being updated.
  • BUG FIX: Fixed some fatal errors in PHP 5.2. (We still recommend a minimum PHP 5.6.)
  • BUG FIX/ENHANCEMENT: Removed a unnecessary hr element when viewing the table of all active memberships.
  • BUG FIX/ENHANCEMENT: Cleaned up some CSS code around buttons.
  • BUG FIX/ENHANCEMENT: Added formatting for the Danish Krone.
  • BUG FIX/ENHANCEMENT: Removed the warning regarding billing limits with the Stripe gateway. Our Stripe implementation has actually supported billing limits for a while.
  • ENHANCEMENT: Added Kenyan Shilling as a currency. (Thanks, Urandu Bildad Namawa)
  • ENHANCEMENT: Updated the description, url, email, and copyright info in the plugin header.
  • ENHANCEMENT: Now showing a note on the pages list in the dashboard if a page is linked to a PMPro page.
  • ENHANCEMENT: Improving logo and watermark in the dashboard for retina displays.

Using the [pmpro_member] Shortcode to display current member information.

I’ve been asked this simple question many times recently: “How do I display the current user’s membership level in my theme?”

This post details how to use the [pmpro_member] shortcode, included in the main plugin, to show specific information about the current logged in user’s membership.


Why would you want to do this?

We created the [pmpro_member] shortcode so that you can build a more robust and personalized experience on your membership site.


How to use the shortcode:

You can place this general shortcode anywhere in your site, either in post content or widgets, or via template files using the WordPress do_shortcode() function.


Available shortcode attributes:

The shortcode accepts one single parameter, with a specific set of values as listed below. These values will pull the data directly from the current logged in user record.

[pmpro_member field="membership_name"]

Supported “field” Values Include:

Membership Level Fields:
  • membership_id
  • membership_name
  • membership_code_id
  • membership_code
  • membership_initial_payment
  • membership_billing_amount
  • membership_cycle_number
  • membership_cycle_period
  • membership_billing_limit
  • membership_trial_amount
  • membership_trial_limit
  • membership_startdate
  • membership_enddate

Fields Stored in the users table
  • user_login
  • user_email
  • user_url
  • user_registered
  • display_name

Payment Fields Stored in user_meta:
  • bfirstname
  • blastname
  • baddress1
  • baddress2
  • bcity
  • bstate
  • bzipcode
  • bcountry
  • bphone
  • bemail
  • CardType
  • AccountNumber
  • ExpirationMonth
  • ExpirationYear


Learn more about General Shortcodes in Paid Memberships Pro »

PMPro Update 1.9.5.4

Version 1.9.5.4 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.

Please update Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.9.5.4 specifically here.


About the Level Description and Confirmation Message

As of version 1.9.5.4, 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.

Add On Updates for July 2018

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.


BuddyPress Integration Add On

BuddyPress Integration

Our BuddyPress Integration Add On allows you to manage access to your BuddyPress Community using Paid Memberships Pro. v1.1 and v1.1.1 resolve several bugs and offer enhancements as listed below:

  • BUG FIX: Fixed fatal errors when PMPro or BuddyPress isn’t activated.
  • BUG FIX: Fixed bug where membership level changes were creatinig fatal errors if Groups was not active.
  • BUG FIX: Fixed bug where the members directory was not being filtered correctly.
  • BUG FIX: Fixed bug where logged in users were being redirected to the BuddyPress registration page even though logged in users can’t register.
  • ENHANCEMENT: Doublechecking pmpro_hasMembershipLevel so plugins like PMPro Approvals can still filter which levels are included when calculating restrictions.

View the Add On


Capture Name and Address

Capture Name and Address for Free Levels

If you’d like to capture the member’s name and address fields for a free membership level or if you are using an offsite payment gateway, check out this Add On.

v.3.3 fixes an issue where name fields weren’t updating WordPress when PayPal Express was used.

View the Add On


Custom Post Type Membership Access

Custom Post Type Membership Access

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.

View the Add On


Group Discount Codes

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.

View the Add On


Subscription Delays

Subscription Delays

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.

View the Add On


WooCommerce Integration

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.

View the Add On

PMPro Updates 1.9.5.2 and 1.9.5.3

Versions 1.9.5.2 and 1.9.5.3 of Paid Memberships Pro are out with just two bug fixes. Version 1.9.5.2 fixes compatibility with Theme My Login. Version 1.9.5.3 fixes an issue (we tried and failed to fix in 1.9.5.2) 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.


Please update Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.9.5.3 specifically here.


The full list of updates is below.

1.9.5.3

  • BUG FIX: The pmpro_ipnhandler_extend_memberships function actually needed use $user_id instead of $current_user.

1.9.5.2

  • BUG FIX: Fixed compatibility with Theme My Login version 7. (Thanks, Jeff Farthing)
  • BUG FIX: Fixed missing $current_user bug in pmpro_ipnhandler_level_extend_memberships function. (Thanks, Anne)

Don’t use Paid Memberships Pro on the WordPress.com Business Plan

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.

  1. 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.
  2. 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.


So where should I host?

It’s been a long standing question which hosting companies we recommend for your Membership site. This guide outlines some general hosting requirements you can review to make sure your selected host will work with Paid Memberships Pro.

If your site is currently hosted on WordPress.com and you’d like to move to self-hosted WordPress, check out this guide on the necessary steps for migrating your website. You can perform the migration yourself, work with your new hosting company to complete the move, or even hire a WordPress Happiness Engineer to perform a guided transfer.

PMPro Update 1.9.5.1

Version 1.9.5.1 of Paid Memberships Pro is out with a handful of bug fixes. These bugs have the potential to hinder sales (especially for customers using PayPal Standard and PayPal Express), so be sure to upgrade.


Please update Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.9.5.1 specifically here.


The full list of updates is below.

  • BUG FIX: Fixed issue with the PayPal IPN Handler where existing users checking out for a new level would sometimes have their membership and new subscription cancelled.
  • BUG FIX: Fixed PayPal IPN Handler to set the status of old levels to ‘changed’ (instead of ‘inactive’) when processing checkouts. This will improve the accuracy of reports.
  • BUG FIX/ENHANCEMENT: Now checking for the recurring_payment_skipped transaction type in the PayPal IPN handler. When a payment is skipped and this message is sent, we will now fire off the failed payment email to the customer and admin. (Thanks, mjulian87 on GitHub)
  • ENHANCEMENT: Removed validation info from the IPN log.
  • ENHANCEMENT: Updated German (de_DE) language files.

PMPro Update 1.9.5

Version 1.9.5 of Paid Memberships Pro is out with support for the new privacy tools added in WP 4.9.6 and a handful of bug fixes.

Please update Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.9.5 specifically here.

More information about the privacy-related updates can be found in our blog post here: Getting Ready for GDPR.

The full list of updates is below.

  • BUG FIX: Added ‘error’ to the list of default order statuses.
  • BUG FIX: Fixed issue where PayPal recurring_payment messages with status “Pending” were treated as “Failed” by our IPN handler. (Thanks, Matt Julian)
  • BUG FIX: The redirect away from the billing page needed to be in the preheader instead of the page shortcode.
  • BUG FIX/ENHANCEMENT: Using the pmpro_getOrderStatuses() function in adminpages/orders.php instead of redundant code there.
  • BUG FIX/ENHANCEMENT: Passing the $order as a second parameter to pmpro_after_checkout when called from the PayPal IPN handler. (The $order was being passed already for “regular” checkouts.)
  • ENHANCEMENT: You can now sort by the Membership Level column added to the users list in the dashboard. (Thanks, Matt Julian)
  • FEATURE: Added support for the privacy features added in WP 4.9.6. Details below.
  • FEATURE: Added suggest privacy page text.
  • FEATURE: Added PMPro-related user meta fields, membership history, and order history to the personal data export. You can filter which user meta fields are included in the export using the new pmpro_get_personal_user_meta_fields filter.
  • FEATURE: Deleting PMPro-related personal data fields when personal data is erased. The ereaser deletes a number of user meta fields (filterable through the new pmpro_get_personal_user_meta_fields_to_erase filter). A user’s membership history and order history are retained unless the user is deleted.
  • FEATURE: Now saving a log of when the TOS page is agreed to at checkout. The ID and date modified of the TOS post is saved along with a timestamp of when the TOS was agreed to. This information is shown on the single order page in the admin, the orders CSV export, and on the edit user profile page in the admin. Note that this feature does not yet backport any data for existing users or ask users to re-agree to the TOS if the TOS has gone out of date.

Preparing for Gutenberg: the New WordPress v5.0 Editor

GutenbergA new post editing and customization experience named “Gutenberg” is coming to WordPress. This post shares how the team at Paid Membership Pro is preparing, planning, and designing for the editor’s release to offer better tools and options for membership sites running our plugin.


What is Gutenberg and how can I learn more about it?

Unless you’ve been hiding under a rock, you’ve probably heard the name and maybe know a bit about the new Gutenberg editor. Gutenberg is an open source project currently offered as a WordPress Plugin. It’s being developed on GitHub and will soon be included as a core feature of WordPress.

The Gutenberg editing experience revolves around “blocks”.

These blocks are a unified way to style content that currently requires shortcodes, embeds, widgets, post formats, custom post types, theme options, meta-boxes, and other formatting elements. By allowing rich customization without deep knowledge of code, blocks make good on the promise of WordPress: broad functionality with a clear, consistent user experience.
via WordPress.org

You can read and learn more about Gutenberg in the official handbook. If you want to learn even more, check out WP Tavern’s post on A Collection of Gutenberg Conversations, Resources, and Videos.


How does Gutenberg work with Paid Memberships Pro?

We know that some Page Builders for WordPress have specific integration considerations when using Paid Memberships Pro. We want your to know that we have tested the latest release of Gutenberg and everything in Paid Memberships Pro works as expected. Everything that works in the current editor is going to work in the new editor.

Gutenberg is largely coded in JavaScript. Some parts of that code don’t interact with the server-side PHP at all. For example, Blocks are defined in JavaScript. And so if you wanted to limit Blocks by membership level, you would need to run that filter in the JavaScript. Going forward, the PHP-based hooks and filters we use to protect WordPress content and features won’t be enough to protect all of the things being done in JavaScript.

The future of WordPress is JavaScript, so Paid Memberships Pro needs to build tools for protecting content in JavaScript. This is an important consideration for our developers and other contributors to the Paid Memberships Pro open source project.


How can Paid Memberships Pro offer Gutenberg support?

We see lots of possibilities for custom PMPro blocks in Gutenberg, and there’s huge potential to extend our core membership plugin as well as our Add Ons.

Here are a few interesting ways we hope to leverage Gutenberg Blocks for PMPro:

  1. Gutenberg Blocks for all shortcodes.

    Any shortcode in Paid Memberships Pro will have a Block equivalent, including the plugin-page shortcodes. The new Blocks will be easier to move around in your page design and can have intuitive settings for customization.

  2. Break plugin-page shortcodes into several Blocks.

    Instead of one shortcode used per plugin page, we plan to break some of our shortcodes into multiple blocks? For example, our [pmpro_account] shortcode currently has a sections attribute, allowing you to customize the display of the membership, profile, invoices, and links areas of that page. Each of these sections could be its own block, making it easier to reposition and tweak them individually.

  3. Block-level Content Restriction

    The current [membership] shortcode allows you to wrap and restrict post content for specific membership levels. We plan to create a Membership Block with settings for the specific level IDs, status, session, and more. You would then be able to nest Blocks within this parent Block and design totally unique content based on the user viewing the page.

  4. Built-in Templates for best practice layouts for your membership sales pages.

  5. Gutenberg gives you the ability to define “Block Templates”, which are groups of Blocks in a preset layout. Block Templates will be a great way to share popular page layouts for landing pages, sales pages, pricing tables and more. We will find (and develop if necessary) the layouts best optimized for conversions to share with our users.

  6. Register Helper Fields as Blocks

    We know that our users would love a drag-and-drop interface for Register Helper. We are working to create a simplified (non-code) based custom user fields structure using Gutenberg Blocks. Custom user meta fields will be visually inserted into the Checkout Page for capture at Membership Checkout, or into the Member Directory and Profile Pages for a unique layout customized to your site’s member data?


What can you do with Gutenberg NOW?

Insert the Shortcode Block with GutenbergIf you’re using Paid Memberships Pro and would like start using Gutenberg for your WordPress editing experience, follow the steps below:

  1. Install and activate the Gutenberg plugin via Plugins > Add New > “Gutenberg”. “>[Download Link]
  2. Edit your Pages under Memberships > Page Settings.
  3. Insert the “Shortcode” block located under Blocks > Widgets.
  4. Move the page’s appropriate shortcode into the Shortcode Block.
  5. Update the page.
Note that for the “Checkout” page to preview properly, you must add a Level ID to the URL (i.e. /membership-checkout/?level=1).


Video: Using Gutenberg to design the Membership Account Page

I made a brief and basic video of how you can use the [pmpro_account] shortcode sections to create a column-type layout for your membership account page. This is not how we plan to offer Gutenberg support in the future, but for now it does give you a glimpse of what is possible. There’s no background music or narration – so please play your own tunes 🙂


We will continue to post updates on the blog here as we make progress on these efforts.

Building a Better Library of Video Documentation

Get your membership site up and running faster with these newly added setup videos. We’re expanding our video guides to help new membership sites to get started using the Paid Memberships Pro plugin.

Check out some of the new videos added below or browse the full library of video content.


Video: Setting up a Customizations Plugin
Video: Install Paid Memberships Pro

Video Tutorial: Initial Setup
Video: Adding a New Membership Level to Paid Memberships Pro


Video: Page Settings
Video: Payment Settings


Video: Email Settings
Video on Advanced Settings