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

Offer members a discounted rate for upgrading to a higher level

Encourage existing members to upgrade to a higher priced level by offering a discount that is unique to them – no discount code required.


About the Recipe

This code recipe was recently developed for one of our Plus Members.  The member was in the process of launching a new membership level and wanted to encourage their current members to make the upgrade to the new membership level by offering a unique discount that can only be seen or used by the current members of their site. The current members would not need to use a discount code to apply for the deal. All they would need to do is select the new membership level and confirm their subscription by checking out of the site.

For those who are looking to simply offer upgrading members the chance to pay the difference between their current and new level, have a look at our Proration Add-On.

Note: This code recipe will not change the amount that is seen on the Membership Level Page of your site and the discounted price will only be seen once on the checkout page. Make sure to communicate this effectively to your members to avoid confusion.

Code Recipe


This code recipe requires a Plus Account or higher.

View Membership Options

Remove homepage redirect for admins only (PMPro Member Homepages Add On)

Prevent members with the Administrator role from being redirected to a new homepage when using the Member Homepages Add On


About the Recipe

Using the Member Homepages Add On for Paid Memberships Pro allows you to completely redirect logged in members to a home page of your choice based on their membership level.

This code recipe will prevent Administrators with a membership level from being redirected to the new homepage. This can be useful at times when a website admin needs to get access to the ‘public/non-member’ homepage.

This recipe will only work if our Member Homepages Add On is installed and activated on your website.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

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

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

Add the Member’s level ID to the body class for level-specific CSS styles.

The code example below will allow you to add the logged-in member’s level ID (if available) to your site’s body class. This can prove useful if you want to change the style of or even hide elements based on level.


Default Body and Post Classes

WordPress offers several functions that can filtered by plugins to add classes to your site’s body element and posts elements. Below are the default filters Paid Memberships Pro adds to these elements:

Classes already added using the body_class Function

Membership Requirement-related
  • pmpro-body-level-required
    Added if the post requires membership.
  • pmpro-body-has-access
    Added if the logged in user has access to the members-only content.
  • pmpro-body-level-$levelID
    Added for each membership level the post requires.

Plugin Page-related
These classes will be added based on the plugin page settings.
  • pmpro-account
  • pmpro-billing
  • pmpro-cancel
  • pmpro-checkout
  • pmpro-invoice
  • pmpro-levels


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Let members access your original homepage when using the Member Homepages Add On.

The code example below will allow logged in Members the ability to access your original homepage when using our Member Homepages Add On.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Prevent users from using an email address as their username.

The code example below will prevent users from setting their username to an email address. This is useful if you want users to use an actual username instead of using their email address in both username and email fields.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Change “Pay by Check” wording to open up more payment options for members.

Our Pay by Check Add On adds a second payment option for members to make purchase by “Check”. With a little help from WordPress’ gettext filter, you can open up more payment options for your members. What types of changes can you make? In some parts of the world, “Check” is spelled “Cheque”. Alternately, you could use the Pay by Check Add On as a workaround to offer members the option to pay by bank transfer. This code recipe will help you rename “Check” to “Cheque,” “Pay by Bank Transfer,” “Send an Invoice” or any other messaging you desire. Our recipe below changes the words “Pay by Check” to “Pay by Cheque or Bank Transfer” on the Membership Checkout page. If you need this to say something else, edit the $translated_text variable on line 11. The Code Recipe https://gist.github.com/travislima/012893d789e57b5055bbc1570753ebf6 Customize and add this code to a helper PMPro Customizations plugin (our recommended method)….

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »