Restrict the display of Advanced Custom Fields (ACF) fields by Membership Level

Advanced Custom Fields PluginAdvanced Custom Fields is a popular plugin available in the WordPress.org Plugin Repository. The plugin allows you to add structured information to your posts, pages, and more.

This guide explains three primary methods to hide or show fields based on the membership requirements for the post.


Option 1: The pmpro_hasMembershipLevel() function.

Since the ACF plugin requires you to add custom PHP functions to your theme’s template files, one of the easiest ways to restrict the display of fields is to wrap your entire display in the pmpro_hasMembershipLevel() function. Here’s an example of using the function in your template files:

You can read full documentation on the pmpro_hasMembershipLevel() function here.


Option 2: The pmpro_has_membership_access() function.

Similar to the option above, this method will look to the post’s required membership levels. You won’t need to specify the level IDs when using this function, it will inherit the membership protection from the “Require Membership” metabox for that post. Here’s an example of using the function in your template files:


Option 3: The acf/format_value Filter

If you’re using version 5+ of the Advanced Custom Fields plugin, you can write a single function that will filter all fields on a member-protected page. This code will uses the acf/format_value filter to check first if the user has access to the post and will then optionally restrict the display of the field.

Note that this will not restrict the display of any custom HTML you have in your page templates, but it is a simple solution that won’t require editing all of your theme files.


If you need help altering these recipes to suit your needs, feel free to get in touch with one of our Support Engineers on our Member Support Forum.

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.

How to build a Video Membership website: School Tools TV Case Study

Look at how SchoolToolsTV.com  used Paid Memberships Pro to help build an educational online video membership website. They offers daily one-minute social skill videos to help teachers increase teachable time, reduce bullying, and improve academic results.

Screenshot of webpage


Making a membership only video library.

In order to build an effective video library that was only accessible to members, Schooltoolstv.com decided to use a really useful plugin called Vimeography. This plugin allows you to display videos hosted by Vimeo in a beautiful, modern gallery. This plugin is a simple solution for a membership site, portfolio, online course, or any other video collection.

Vimeography has a Pro version which unlocks an array of great features including hiding your videos on Vimeo but displaying them on your site, offer downloadable videos, and more.

In addition to Vimeography, Schooltoolstv.com is using Paid Memberships Pro to handle the membership side of their website. This includes restricting video and other content as well as handling the checkout process of the website. The WordPress theme that is being used on the website is Masterstudy, a premium WordPress theme by Stylemix themes.

Key components to creating a video membership website.

  1.  Install Paid Memberships Pro on your WordPress website.
  2. Create a Membership Level for your membership site and proceed to set up Paid Memberships Pro with all your relevant settings.
  3. Create a Vimeo Account and upload the videos that you want to include in your video library.
  4. Download and Install the Vimeography plugin.
  5. Use the Vimeography plugin to embed and display your videos on your WP page of choice.
  6. Use Paid Memberships Pro to restrict the page so that only members will have access to your video library.
  7. When users visit your video library they will be greeted with a login/register message encouraging them to either sign up for a membership level or if they are already a member, login to see your videos.

Top Tips for your video membership website

  • Select a theme with strong membership components like Memberlite.
  • Offer some free video content so that your visitors will have an idea of the type of content you provide.
  • Sync new PMPro membership signups with a MailChimp list. This will allow you to send out email newsletters, letting members know that you have released a new video(s).

Meet Rusty May

Rusty is a passionate educator and coach who is committed to helping teachers create caring working relationships with every student and giving them powerful tools that will help reduce negative classroom behaviors that rob them of their teachable time.

 

 

My web designer recomended Paid Memberships Pro, I found it easy to set up and use for my membership site. 

—Rusty May, SchoolToolsTV.com


About SchoolToolsTV.com

Effective teaching relies heavily on a healthy relationship between a teacher and the student. The better the relationship, the better the results. Schooltoolstv.com have made great effort to put together various videos and workshops for both teachers as well as students to help improve things like Social Skills, Classroom management and reducing bullying.  By subscribing to the School Tools TV membership, users will be granted access to daily educational videos, the SchoolsToolsTV community forum, and resources provided by subscribing teachers. Some of the benefits of being a subscriber and watching the SchoolsToolsTV show are:

  • Better Relationships
  • Fewer Problems
  • More Teachable Time
  • Improves Academic Results
  • Reduces Bullying

Visit SchoolToolsTV.com

Character Education Resources, Help against Bullying, Classroom School


If you have an interesting business that uses Paid Memberships Pro in a component of its technology suite, please submit an application and we will get in touch about preparing an in-depth showcase of your application.

 

PMPro Update 1.9.4.4

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

Proration Add On Update v.3

We’ve made some material updates to our Proration Add On. Our aim was to implement the most common proration use cases while making it easier to customize.

While enhancing the plugin and fixing what we considered bugs in the proration calculation, we made changes that may be unexpected for existing sites running the Add On. We expect most users will be happy with these changes, but if your site relied on the old math, please reach out to us in the forums and we can help you set up your desired proration model.

Below are more detailed explanations of each change as well as instructions on how to customize the updated Add On.


Change #1: The subtotal of the user’s last order is now used to calculate the pro-rated amount.

Prior to v.3, the proration calculation was performed using the “total” from the user’s last order. If you were calculating tax on your site, the total would include the tax. Now, the pretax amount is used in the calculation and taxes are applied after the pro-rated amount is determined.


Change #2: When upgrading (or sidegrading) to a level with a different payment period, a different proration calculation is used.

If the level the user is checking out for has a different payment period than their previous level (e.g. going from a monthly plan to an annual plan), the rules for prorating are basically:

  1. Calculate a credit based on how much time is left in the user’s current payment period,
  2. Apply that credit to the initial payment, and
  3. Set the new subscription to renew one (new) payment period out from the current date.

This is different from what is done when changing between levels with the same payment period (e.g. changing between monthly plans). In those cases, a pro-rated amount is calculated based on both the old and new levels based on how much time is left in the current pay period, and then the new subscription is setup to renew on the same date as the old subscription.


Change #3: We are rounding all dates down to the same hour/minute (midnight) when performing calculations.

This is a small change, and we can’t avoid this entirely, but rounding down the dates will minimize cases where users go to the checkout page and see one pro-rated amount and then come back later in the same day and see a different pro-rated amount. Most notably, if a user goes to change membership levels immediately after checking out, the credit for the current day will be applied to the pro-rated amount.


Customizing the Proration Add On

Instead of writing a custom proration plugin from scratch, we’d like users to be able to use the main Proration Add On with extra code in a customizations plugin to override the default behavior. This way, you’ll be able to use the helper functions provided by the Proration Add On and get updates to those functions as they are pushed out. (The next step for us would then be to add a wizard-like settings page to tweak the proration settings instead of using custom code.)

You can modify the behavior of the Proration Add On through hooks and filters or by overriding the main checkout level filter callback. Doing this will require a custom plugin and help from our team or a WordPress developer.


Filters in the PMPro Proration Add On

  • pmpro_is_downgrade
    apply_filters( 'pmpro_is_downgrade', bool $is_downgrade, level_object $old_level, level_object $new_level);

    Returns true if the new level is a downgrade from the old level.

  • pmpro_have_same_payment_period
    apply_filters( 'pmpro_have_same_payment_period', bool $same_payment_period, level_object $old_level, level_object $new_level);

    Returns true if the old and new levels have the same payment period


Overriding the Proration Rules

The main logic for how to prorate the levels can be found in the pmprorate_pmpro_checkout_level() function of the plugin. If you’d like to use different proration rules from the default, you can unhook our function and hook in a function of your own. Here is a template for how to do that.

More details can be found on the Proration Add On page.

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

Dev Chat Summary from February 1, 2018

Slack_IconBelow are my summarized notes from our dev chat today.

We discussed GDPR, the Multiple Memberships per User Add On Compatibility Road Map, our update Developer Partner Platform, and a feature suggestion for our Stripe integration.

Theme music for this chat was the Tron: Legacy Reconfigured album by Daft Punk.


GDPR

We discussed the various articles of the European Union General Data Protection Regulation and how they can be addressed by Paid Memberships Pro in our software and as a company. It was a good discussion. I will be writing up a more detailed post including what I feel needs to be addressed for our software to comply with the GDPR. Some of the action items for this could be done collaboratively between ourselves and other ecommerce plugin authors. So I will pursue that while making sure PMPro is ready by the deadline in May.


Multiple Memberships Per User Updates and Add On Compatability Roadmap

The MMPU Add On has been working well in it’s beta release on several sites for the past 6 months or so. In the next few weeks, we will launch the add on officially with the known caveat that many of our add ons will not work as expected with the MMPU Add On active.

We will be tagging all our add ons on this site to show which are compatible with MMPU, which will never be compatible with MMPU (because it doesn’t make sense or would be too technically difficult), and which we will be working on.

Our hope it that over the next year or so, with the help of the developer community, we can update the add ons that need it. To that end, we will be sharing case studies on our blog as we do this work so we can compare notes and share methods.


Becoming a Partner, New Agreement Contract and Plans

Until now, we’ve had adhoc agreements with the development partners showcased on our Developers page. We appreciate the role these developers play in the PMPro community. Our partners are responsible for building the best examples of sites running Paid Memberships Pro, working with us to address new markets and use cases, and so much more. Our goal is to formalize the relationship we have with the partners and gather resources to work on shared marketing projects.

Freelancers and agencies interested in joining our developer network can apply here.


Idea for Stripe Integration

We discussed the possibility of at checkout, checking for an existing customer record using the same email address before creating a new customer in Stripe. Some of this was coded in a development branch while working to fix synchronization issues between PMPro and Stripe. The synchronization issues were addressed by other fixes, but it still might be useful to reuse Stripe customer records instead of creating a new one when a user checks out in PMPro.

PMPro does keep track of a user’s customer id and reuses it if that customer checks out again. However, if you integrate several sites with Stripe, each site will have it’s own customer record for that same person.

Many of us agreed that it’s best to stick to the current system of creating a new unique customer id the first time a user checks out in PMPro. If we use a customer record managed by another app, we can’t be sure what that other app might do with the customer or their subscriptions. Also, the Stripe API does not allow you to do a straightforward search for customer id by email address. The implementation we had used a kind of hack where we would download all customers and their email addresses for cross reference. It seems that Stripe doesn’t want to encourage this kind of behavior.

A script to resync customer ids by email address might be useful in a pinch for cases where PMPro went out of sync with Stripe. (An example might be if someone is importing users from another system or otherwise had to delete and recreate WordPress users.)

We also briefly discussed the need to explore the Stripe Connect platform, which has some benefits over the direct API method we use of integrating with Stripe. Namely, users who have a credit card stored in Stripe would be able to checkout very quickly. There is also the fact that Stripe might require or strong encourage use of Stripe Connect in their temrs of service.


Scheduling for Future Dev Chats

Instead of a regularly scheduled dev chats, we are now keeping a list of topics for discussion. When the list hits 3 items, we will schedule a dev chat to go over those topics. If there is something you would like to discuss with the PMPro developer community, let us know through our contact form and we will add it to the list.

Thanks again to everyone who attended today.

10 Popular Pricing Models for Membership Sites

As you begin to build a membership or subscription business online, one of the first decisions you need to consider is pricing. More specifically, what type of pricing model do you want to use for your business?

This post aims to cover the most popular pricing models for membership-type businesses.

  1. Fixed Term Membership
  2. Recurring Subscriptions with Fixed Price per Period
  3. Front-loaded Membership Pricing
  4. Installment Plans
  5. Free or Reduced-rate Trial Periods
  6. Lifetime Membership
  7. Group Pricing / Sponsored Membership / Umbrella Plans
  8. Addon Pricing Models
  9. Utility Pricing
  10. Donations or “Pay What You Want” Membership


Remember: Price should always match the value.

Before you even begin to drool over the idea of hordes of members paying you a recurring fee each week or month, ask yourself how your membership business delivers value to its members. Is value delivered evenly over the lifetime of membership? Is the majority of value delivered in the first months of membership?

The answer to this basic question is what determines how you price your membership options. Pricing your membership or subscription options in a way that is contrary to the value delivered is a set up for failure—you do not want members to stop and ask themselves, “Hey, why am I still paying for this?” That’s a sure way to create a bad feeling and lose members.

If you’d like to read more about this topic, Jason wrote a post earlier all about this that included some case studies.

Here’s another way to think about value pricing: how much do you want to make?

Now this may seem like a silly question, the answer to which is “As much as I can possibly make!” But if you are truly honest with yourself, you should be able to set a realistic revenue target or goal. Using this revenue target, you can back into membership pricing (and possibly even refine your business model).

For example, let’s say you set a revenue target at $30,000 per month. This could be achieved via several pricing models:

  • 750 members paying you $10/week.
  • 1,000 members paying you $30/month.
  • 835 or so new members per month committed to paying you $36/year.

Which of these is most achievable given the premise of your membership site? How can you deliver value along the timeline of your membership to retain these members? Is it possible for you to grow to a member base of this size?

If you’re still thinking about pricing from this high level, you might want to read Jason’s series on pricing that starts here before diving into the details below.

If you have an idea of the type of pricing you want or otherwise just want to browse through the options below, continue reading. Here are some common pricing models we have seen used for member-based businesses.


Fixed Term Membership

In this pricing model, the membership level has a set term with expiration. Members must renew to maintain membership. We often see this pricing model used for set term of the calendar year (January 1 to December 31). This is a comment pricing model for traditional Associations and Organizations as well as benefactor groups that report membership on an annual basis and require people to “renew” that term each year.

You can do some creative things with this pricing model, such as offer a discount for early renewal, a discount for purchase a multi-year membership in advance, or even prorate membership for people who sign up mid-term.

For more reading on this model, see:


Recurring Subscriptions with Fixed Price per Period

This is a very popular model of membership pricing, where a specific price is charged “per month” or “per year” for the life of membership. Most payment gateways also allow pricing per week or custom periods like every 3 months, every 60 days, etc.

Recurring subscriptions work well for newsletter-based businesses, sites with content written by “experts” or coaches, as well as online social communities and listings sites.

The important caveat to this type of membership pricing is that you continue to deliver value each term. If your members are paying you monthly, you better be certain that there is “new stuff” (good new stuff) delivered to the member each month.

This model is very easy to set up with the base Paid Memberships Pro plugin. You would achieve this by setting an initial payment and recurring subscription of the term of your membership.


Front-loaded Membership Pricing

Jason is a fan of front-loaded pricing models—where a higher amount is charged at signup, then a lower rate is charged each term. This can be a single up front higher cost, or an installment (i.e. $100 per month for the first 3 months then $15 per month).

This is a key model to consider if your answer to when value is delivered is “mostly in the first few months” (or weeks). I see this pricing model for health and fitness sites aimed at weight loss or a software businesses with a “get started” rate then maintenance rate.

For more reading on this model, see:


Installment Plans

Installment plans are a bit like the front-loaded membership, but they do not have the ongoing recurring payment. This model is useful if you need to charge a high price but know that your customers cannot afford that large expense in one payment. I have seen this model used for executive coaching, training programs, and the sale of physical goods.

This model is very easy to set up with the base Paid Memberships Pro plugin. You would achieve this by setting an initial payment and recurring payment of the term of your membership, with a “payment limit”. You can optionally set an expiration date on membership as well. Let me break this down for a membership level that you want to charge $400 for over the course of 4 months and maintain the user’s membership for 1 total year.

  • Initial Payment: $100
  • Recurring Subscription: $100 per 1 month
  • Billing Cycle Limit: 3
  • Expires in: 1 Year

One caveat of an installment plan is that you want to lock a member in to paying for the full installment. If you’ve giving a customer a $400 physical product, and they cancel membership in the second month, you’re out a big chunk of money. See this guide for help on locking a user from changing their level during the installment period: Methods to Block Users from Logging In, Selecting or Changing Membership


Free or Reduced-rate Trial Periods

We aren’t a big fan of this pricing model, but it is one you see a lot in the wild. [Jason: I’m a fan of free trials if your goal is to get more people using your service or product. When you’re actually ready to make a profit, switching to a model that charges based on true value of your product up front is best in my opinion.]

In general, the free trial model charges a lower rate for the first few terms of membership, hoping to hook the customer into maintaining their membership after the trial ends. I have see this model used in a lot of online software and tools, but also for “subscription boxes” (get your first box – just pay shipping!), and other digital communication or financial tools.

In all of these cases, its important to remember that you must prove the worth of your full price membership during the trial period. You don’t want to price yourself so high that people aren’t able to maintain membership at the full rate, and you don’t want to deliver all the value of membership during the trial so there’s no reason for them to stay on.

If you’re a fan of the membership trial model, we strongly suggest offering a reduced rate trial instead of a completely free trial. This forces your members to be a bit committed to your product and can help insulate you from the workload created by loads of free trial members that never really intended to stick around.

For more reading on this model, see:


Lifetime Membership

You can add a “lifetime” option to almost any pricing model you select. Sometimes a reduced-price lifetime plan is offered for a limited time as an incentive for early adopters. Sometimes the lifetime plan is always available for customers who just want to pay once without worrying about recurring subscriptions.

To figure out what to charge for your lifetime plan, you would take some multiple of your monthly membership, perhaps 30x a monthly membership or 2.5x an annual membership rate. Ideally, your lifetime plans should result in the same “customer lifetime value” as someone paying per period. So having a good estimate of your renewal rates and customer lifetime value will help you to find the sweet spot.

Sometimes a higher-priced lifetime plan can be used as a decoy and will not be selected by a significant number of people, but will make your regular price look like a better deal. We’ve heard from some sites with lower-volume, higher-priced lifetime plans report that “every once in a while you get a little bonus when someone chooses the lifetime option”.

This model is very easy to set up with the base Paid Memberships Pro plugin. You would achieve this by simply setting an one-time initial payment on the membership level with no recurring subscription or expiration.


Group Pricing / Sponsored Membership / Umbrella Plans

This model is useful when you have a breakdown of individual members as well as corporate or company-type members. For this model, you would take your individual member pricing and offer a value to the parent account that is purchasing more than one membership at a time for a team of people. For example, you could offer a single membership for $125 per month and then a group license of $500 for a 5-member organization.

For more reading on this model, see:


Addon Pricing Models

In this “build your own” membership model, users may be charged a base price, then have the option to select additional membership features. These features may be added interest groups for a newsletter or blog category subscription, or a la carte features of membership, such as an annual resume review service, a consultation phone call or other “one-off” products. We have seen this model used for traditional newspapers that offer an online and optional physical printed edition.

For more reading on this model, see:


Utility Pricing

In this pricing model, users are charged based on some kind of consumption metric. You may recognize this model as used by most email marketing services that charge based on number of members in your list. Cloud hosting companies might charge based on the disk space and/or bandwidth used.

We wanted to include this pricing model even though Paid Memberships Pro doesn’t offer utility pricing in the core plugin or any of our add ons. It can be a smart model if the cost to you as a business is truly based on a member’s usage. Some gateways like Stripe and Braintree allow you to adjust a user’s subscription amount whenever you like. Others like PayPal offer changes within a certain range. With some custom coding, you could track the metric you need to calculate the monthly/annual total, generate an order for that, and then attempt to resolve that order against the customers credit card stored at the gateway.


Donations or “Pay What You Want” Membership

If you go the route of a donation-based membership, its best to enter into things with low expectations. These types of membership sites are often run by producers who would be doing their thing regardless of payment. If you’re a passionate product reviewer or write your own digital music and just want to get your stuff out there, then asking for optional donations can be a positive way to make a modest income without the pressure of a traditional membership model.

We like the “Pay What You Want” model, especially if you put some social pressure on your potential members: “Most people pay $5 per month.” Another option is to include bonuses above a certain amount to encourage higher revenue per sale.

For more reading on this model, see:


Now put on your thinking cap.

I hope this post has exposed some of the traditional and not-so-traditioanl ways you can price your new membership or subscription-based business. And don’t feel shy about changing a pricing model for an existing business—we did that here at Paid Memberships Pro when we really did some thinking about value pricing. The majority of our value is delivered in the first few months of membership, when the support customer is just getting their membership business off the ground. We offer a discounted annual renewal rate because there is ongoing value delivered via our blog posts, code recipes, and continued development to the Plus Add Ons.

Let’s keep the conversation going in the comments below.


Other Posts on Pricing

Dev Chat February 1, 2018 at 1pm EST: Get Invited to Our Slack Channel

We will be holding a Dev Chat on Thursday, February 1, 2018 at 1pm EST in our Slack Channel.


Dev Chat Topics Include:

  • EU GDPR (European Union General Data Protection Regulation)
  • Multiple Memberships Per User Updates and Add On Compatability Roadmap
  • Becoming a Partner, New Agreement Contract and Plans
  • Stripe Customer Records (Decision on using an existing customer record if one exists for the user’s email)

All are welcome to join the discussion. Please reply to this blog post and we will add you to the Slack channel before the chat starts.

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 »