Require Membership to Purchase Specific Categories of Products in WooCommerce

Offer special “members-only” products that require the user to have an active membership in order to purchase. The selected products will still appear in your Shop page, but cannot be purchased by non-members.

About the Recipe

This customization recipe allows you to restrict the purchase of products in designated WooCommerce product categories for active members only. You now have full control over which categories require a membership in order to be purchased and which product categories (if any) are available to the public, regardless of their membership status.

This recipe can be used on its own or in conjunction with our WooCommerce Integration Add On, which offers additional features for integrating Paid Memberships Pro with WooCommerce.

Woocommerce product example

Some suggested use cases include:

  1. A shop that offers an array of products, some of which will only relate to members. This can include products like Membership-branded clothing or accessories, access to digital add-on products, specialized meal or diet plans and more. Basically, anything that you only want your members to be able to own and purchase.
  2. A shop that offers unique or special products that can entice users to sign up for a membership in order to purchase. This can be an added incentive to users thinking about signing up for your membership.
PRO TIP: Try to make your membership level/products as easy to sign up for and purchase as possible. A user may feel reluctant to join a membership only to be able to purchase a particular product. This can leave them feeling “forced” into something that they do not want to be a part of.Look at offering a lot of value for your membership packages and rather use this as an “added benefit” instead of a means to purchase a product.

The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Capture the User’s First and Last Name at Membership Checkout

By default, the Paid Memberships Pro membership checkout does not request the user’s first and last name. If you’d like to capture this information for your members, we have a very simple Add On that instantly adds the fields.

View the Add On

How it Works

After installing and activating the Add On, the Membership Checkout page will automatically include a field for “First Name” and “Last Name” below the password fields in the “Account Information” area of checkout.

Watch the Installation and Activation Demo

View the Add On

This entry was posted in Add Ons and tagged . Bookmark the permalink. Last updated:

BuddyPress Seminar April 11th and 12th, 11am to 3pm EDT

On April 11th and 12th from 11am to 3pm EDT we will host a two-day online seminar on using BuddyPress with PMPro.

We will field questions on using the two plugins via live video stream and offer hands-on help as you set up BuddyPress. Join the whole seminar or pop in for an hour or two. Our goal is to help as many of you as possible to make full use of these plugins and learn how you are using BuddyPress so that we can improve our platform.

You can prepare for the seminar by setting up a development site either on your web host or a local site created via Local by Flywheel. Be sure to install and activate these plugins: Paid Memberships ProBuddyPressand our BuddyPress Integration Add On.

The seminar includes a space for chat, but if you’d like to be included in our Slack channel, please request an invitation via the Contact Form.

A link to access Day 2 of the seminar will be posted below for our support-level members.

Thanks! I look forward to helping as many of you as possible with BuddyPress and Paid Memberships Pro.

The GDPR and How it Impacts Sites Running Paid Memberships Pro

The European Union (EU) has passed new regulation related to data privacy for its citizens called the “General Data Protection Regulation (GDRP)”. This regulation carries important considerations for anyone operating a website that uses Paid Memberships Pro and serves customers residing in the European Union.

Continue reading to see how the team at Paid Memberships Pro is preparing for this regulation and what steps you should take to better understand and comply with the GDPR.

What is GDPR

GDPR is a set of regulations will affect all companies that processes and hold personal data for people residing in the European Union. The regulations will begin to be enforced on 25 May 2018 and apply to all companies worldwide, regardless of location.

Failure to comply with the GDPR could carry huge penalties, regardless of whether you are located in the EU or not. While it may be possible for smaller non-EU companies in particular to fly under the radar of these regulations, it is our opinion that all businesses do their best to comply with the GDPR. Following these best practices to respect the privacy of your users is good whether it’s required or not, and it’s very likely that other jurisdictions will adopt regulations similar to the GDPR. You should review the full GDPR documentation and gain a firm understanding of how to comply fully. The home page of EU GDPR provides a great overview of the GDPR and links to additional resources for further reading.

WordPress Core Efforts for GDPR Compliance

There are updates we need to make to our Paid Memberships Pro plugin for GDPR compliance, and we plan to have those released before the May 25th deadline, and will detail them in more detail below. However, the GDPR requirements affect other plugins and WordPress core in general. And so we always knew that a full solution for GDPR compliance was something that impacted more than just our plugin.

For a while there, it was looking like GDPR compliance for WordPress was going to require one or many third party plugins to reach full compliance. I thought we might even have to create some of these plugins, not just for PMPro users but for all WordPress users.

This year a few plugins developed by other groups started looking very promising, with a lot of effort and functionality in place to meet the requirements of the GDPR in a way that was adequate but general enough for the wide range of sites (each with different models of data collected/etc) that run on WordPress. I started looking into what it would take for PMPro to integrate with these plugins, but then discovered that a group of veteran WordPress core contributors was working on GDPR updates to WordPress core.

The WordPress core developers have started a number of efforts to support Right to Access and other GDPR requirements, with a the target of including these updates into WordPress 5.0. These updates will add hooks and filters for plugins to use. We hope to release specifics soon (i.e. code on GitHub you can test), but our plan is to support these core updates and use the features, hooks, and filters added to make sure the PMPro plugin is compliant.

Data Subject Rights

There are 6 key areas of GDPR that outline a subject’s rights to their data. Below is an overview of each area and how we plan to offer compliance:

  1. Breach Notification

    The GDPR outlines that if a subject’s data is compromised (breached) in a way that is likely to “result in a risk for the rights and freedoms of individuals,” the company must notify their customers within the first 72 hours of their awareness of the breach.

    This area of GDPR does not have a specific effect on how Paid Memberships Pro works as a plugin on your WordPress site. We’re including it here so that you as the site owner are aware of the requirements related to your knowledge of a breach in your website data. This article on “Hardening WordPress” via the Codex is a good resource to review if you would like to strengthen your website’s security.

  2. Right to Access

    This portion of the GDPR provides subjects with the right to request a full report (electronically) of all data that the company is maintaining about them, what that data is being used for, and with whom that data has been shared.

    We plan to use new hooks added to WordPress for GDPR to add our own default report about the data that Paid Memberships Pro tracks for users and how that data is shared with third parties. This report would be editable for you to adjust based on your specific use case.

    As for what third parties may have accessed or processed data about the subject, we plan for the electronic report to also include a list of third party sources that our plugin recognizes may have received a copy of the data. These may include (but are not limited to) your payment gateway, email marketing services, CRM services, other integrated plugins, and analytics software.

    There will certainly be other sources that may have received some portion of a subject’s data that are outside of our awareness. We will leave this portion of the electronic report up to the site owner to add in any additional sources that may have processed data about the subject.

  3. Right to be Forgotten

    As the name states, this area of the GDPR allows a subject to request all of their identifying data be erased (also known as Data Erasure). The data controller must erase and cease to share all data about the subject, and is also potentially responsible for forcing any third party with access to the subject’s data to stop processing it.

    We will ensure GDPR compliance by making sure our Core Plugin and Add Ons completely clear identifying user meta and options saved about a user when the user is deleted (when the WP_User object is deleted). We already do this in our plugin, we’ll want to make sure it functions for GDPR-related deletions and covers all the data that it should.

    We will not delete related order data about the user as it needs to be preserved for accounting records. The order data does not include any identifying information aside from the User’s ID (which will be deleted and no record of the user’s ID will be present after the WP_User object is deleted). The fact that this data is retained for business reasons will be included in the Right to Access blurb generated by PMPro.

    This data erasure will include all captured fields about the subject that were added via the Register Helper Add On. If the subject has provided upload files as part of completing a Register Helper checkout field or profile field, this uploaded file must also be removed.

    Other requirements that fall under this section include anonymizing data, either up front or instead of deleting data when a user requests to be forgotten. We will evaluate our plugin for data that should be anonymized this way.

  4. Data Portability

    Data Portability refers to the regulation that a subject should be able to request and receive all personal data the company stores about them in a ‘commonly used and machine readable format.’ The subject should have the right to transmit this personal data to another controller.

    As it relates to Paid Memberships Pro, we will use the new hooks and filters added to WordPress for GDPR compliance to include PMPro-related data in any exports. Per the requirements of the GDPR, these exports will be in a digital and accessible format (CSV, JSON, or XML) that can be readily shared by the subject with another controller should they so desire.

  5. Privacy by Design

    A key factor of PCI Compliance, Privacy by Design outlines that a data protection must by a component of how you design your system, not an afterthought. This includes both the technical and the operation aspects of your systems.

    It is important for you as a membership site owner to only share a subject’s data with the people in your organization that need to process that data. You can do this by sharing a limited number of Administrator or Membership Manager Roles (which both have access to member data) among the core organization and remove access to this data for unnecessary user accounts (developers, test accounts, etc.). It is also important not to request and store data that won’t be needed for your operating activities.

  6. Data Protection Officers

    This regulation refers to how a data processor must share their data processing activity with officials in each member state of the EU. Former EU regulation required reporting of data processing activity to each individual member state’s appropriate offices. The new regulation as outlined in the GDPR removes this requirement in most cases. We suggest exploring the full GDPR resources for more information about whether or not you must report data processing activity.

    This is not a factor that Paid Membership Pro will create a system or integration for, but rather the scale and operating activity of your organization.

GDPR Resources for Continued Reading

Here is a list of other resources you can review for your protection and understanding:

This entry was posted in General and tagged . Bookmark the permalink. Last updated:

Display Comments on a Members-Only Post to Non-Members

Give users a little insight into your blog posts by displaying comments to non-members. This can be a great way to provide social proof for your content without exposing it publicly.

Display comments of a Member-Only blog post to Non-Members.

We recently had one of our members ask us to help them with an upsell strategy. This member, in particular, wanted to display the member comments associated with their restricted, members-only blog posts. By default, Paid Memberships Pro will hide the comments and comment form for all posts that require membership.

The idea is when a non-member views a restricted blog post, they are able to see all members-only comments but not the post’s content. Having other members commenting saying things like “Thanks for the article, this really helps!” or “Awesome! This step by step guide was quite useful.”, can really help ignite a non-member’s curiosity and motivate them to subscribe to your product.

This approach can also help display your community’s activity and engagement: another strong selling point to any non-member considering a signup.

Recipe: Default Comments Hidden from Non-Members
Default: Comments are hidden.
Using Recipe, Comments Displayed to Non-Members
After: Comments are displayed.

The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

New BuddyPress Integration for Membership Communities using Paid Memberships Pro

We’ve just launched our BuddyPress Integration in the WordPress Plugin Repository. You can now restrict access to specific features of your BuddyPress community by membership level, allowing you to build a custom, private, and flexible members-only community.

View the Add On

BuddyPress Integration for Paid Memberships Pro WordPress PluginBuilding a Membership Community with your WordPress Site

BuddyPress adds community features to WordPress, including Member Profiles, Activity Streams, Direct Messaging, Notifications, and more. What many of you have already implemented via custom coding is now possible with one easy-to-use plugin.

With the help of this integration plugin, membership sites running Paid Memberships Pro can now take advantage of the following features:

  • Redirect users without access to a specific page which can be used to explain the community features and sell community membership.
  • Level-specific settings to restrict access to BuddyPress features including Group Creation, Single Group Viewing, Groups Page Viewing, Joining Groups, Public Messaging, Private Messaging, Send Friend Requests, Listing in the Directory.
  • Assign members to groups in BuddyPress.
  • Restricted access settings for users without a membership level.
  • Option to use the BuddyPress Registration process.
  • Assign “member types” by Membership Level.
  • Display a Member’s Level Name on their BuddyPress Profile.

Migrations Steps for Sites Using a Custom-Coded Solution

Prior to this Add On’s release, we did offer a custom-code solution to restrict BuddyPress access to Members. If you are using a custom solution loaded via a Plugin for PMPro Customizations, below are the steps to migrate to the new Add On-based solution.

  1. Locate the custom code in your Customizations Plugin.
  2. Uncomment or Remove the custom code. We recommend saving a copy of the code as a backup.
  3. Install and activate the BuddyPress Add On for Paid Memberships Pro.
  4. Configure the Add On settings per your unique restriction goals. Read the documentation page for help on setting up the Add On.


This slideshow requires JavaScript.

Explore the Add On Documentation

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.

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 a 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.

PMPro Update

Version of Paid Memberships Pro is out with 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 specifically here.

The full list of updates is below.

  • BUG FIX: Updated the filters to extend membership levels to use the new pmpro_getSpecificMembershipLevelForUser() function to avoid bugs when MMPU is enabled.
  • BUG FIX: Fixed cases where certain email templates were resulting in the body of the email being duplicated.
  • BUG FIX: Fixed conflict with pmpro-email-templates when emails were disabled (the pmpro_email filter returns false). (Thanks, Mathieu Hays)
  • BUG FIX: Now updating status on related subscription orders BEFORE canceling at gateway to avoid cases where the webhook sent by the gateway after canceling the subscription triggers further cancellation attempts.
  • BUG FIX: No longer showing the “Stripe Publishable Key appears incorrect” error message if the key field is blank.
  • ENHANCEMENT: Added the pmpro_getSpecificMembershipLevelForUser( $user_id, $level_id ) function for cases where MMPU is enabled and you want data about a specific membership level a user might have.
  • ENHANCEMENT: Changed labels on the reCAPTCHA settings to match their current terminology: Site Key and Secret Key.