The Addon Packages Plugin allows you to sell access to individual pages or posts, or sell a la carte items (such as courses) for a flat fee.


You can download it via the add on documentation page or PMPro Plus members can install it directly in the WordPress admin via the Memberships > Add Ons page.

Once activated, a new meta box labeled “PMPro Addon Package Settings” will be shown under your post content when editing a page or post. (If you don’t see this, make sure that “PMPro Addon Package Settings” checked in the Screen Options at the top of the screen.)


To charge for access to a page:

  1. Set a price in the PMPro Addon Package Settings.
  2. Check at least one membership level under “Require Membership” in the sidebar.
  3. Click Update/Publish to save.

Some important notes:

  • If you don’t have any membership levels or want users to only pay the page price to view something, create a free membership level and select it.
  • If users from multiple membership levels (including non/free levels) can access a page, make sure you check all of the membership levels.

The plugin will update the text and links generated for non-members viewing a page with a price on it. If you wish to override this language, you can edit it or replace it using the pmpro_non_member_text_filter, pmpro_not_logged_in_text_filter, and pmpro_rss_text_filter filters.

The way this plugin works is that you actually checkout for your current membership level again (or a new membership level if the user doesn’t have one yet) and the page price is added to your bill. The plugin makes sure you don’t pay the base membership level price twice and also makes sure your membership payment and expiration dates stay the same.

If you would like to link directly to the checkout page for a page, the URL structure is /membership-account/membership-checkout/?level={level_id}&ap={post_id} (Replace the parts in curly braces and make sure the page URL in front is correct for your checkout page.)

View the Add On

Comments (47)

is there a way in PMPro to allow free access to one forum and only paying user access to others? I assume not as you yourselves don’t do that. Would be handy as means even free users are already on the site – easier to encourage them to become paying customers.

Any plans to integrate with loginradius to let people log in with facebook login details?

You can give free members access to a forum. We just choose not to do so right now on our own site. You would just create a free membership level and a forum for them, then link them up via the bbpress plugin.
https://gist.github.com/1633637

I’m not familiar with loginradius. We ask for a username and password at checkout and create the WP user from that. I don’t have any plans to let users use a Facebook or Twitter account instead. However, if you changed your flow so people signed up with Facebook/Twitter first, then visited the checkout page, it would detect that they are already logged in and there would be no issues with checking out or access the site later.

Hope this makes sense.

Would a WP user account complete with email still be created / updated upon checkout if a person signed in with loginradius or some similar account?

I’m not familiar with loginradius, but if someone who already has a WP User account checks out, the membership level is attached to that user. Or if someone has a user account created at checkout by PMPro, when the login with loginradius, it should cross reference on their email address to attach the existing account to the social network login/etc. I know that other social login plugins for WP work this way.

Very interesting seeing LoginRadius popup here – I’m considering rolling out PMPro on top of a Multisite/Buddypress network with LoginRadius providing social login and account creation. I’m planning to use your Do-It-For-Me plan, specifically to avoid any issues integrating a system I’m less familiar with.

What’s the lead-time for DIFM service under a scenario like the one I’ve described?

You can take a look at the social sign on widget in the upper right column of sites like http://reconverge.net (main network site), http://intelcollab.com (learning community subsite) or http://aurorawdc.com/blog (blog page of the corporation underwriting the network). I would want the WordPress user database to govern access to all the subsites restricted by PMPro, but enabling new members to create their account with LoginRadius.

There would be a free level, a paid level and then an invitation-only level and plan to also offer an affiliate program for anyone in the paid level.

Assuming everything else is in place and we’re just wiring those plugins to work nicely with PMPro, we can get this done as a DIFM. With our current demand, we’re finishing up DIFM’s about 2 weeks after checkout.

“the URL structure is /membership-account/membership-checkout/?level={level_id}&ap={post_id} (Replace the parts in curly braces and make sure the page URL in front is correct for your checkout page.)”

Hi,
I don’t understand where can I make this changes? Pls help.

I’m not 100% clear on your question but here goes – that URL is simply a demonstration of how to build a direct link to the add on package purchase. The base URL is the direct url to checkout for the level required by that add on, then you append that URL with ?ap={post_id} where {post_id} is the page or post ID of the add on package you are building the link for. If you’d like more help integrating this addon, please sign up for PMPro Membership here: https://www.paidmembershipspro.com/pricing/ or if you’re already a member, open a new topic on our members forum.

Is there a way of having a variable price for a page?

The requirement is to create a paid page for a counsellor to review someone’s story (I’m using a private custom post type for this). Each counsellor charges a different amount to do so. I’d prefer to avoid having heaps of identical post id’s with different pmproap_price fields.

Any suggestions? – many thanks

Here is where the price is fetched from post meta:
https://github.com/strangerstudios/pmpro-addon-packages/blob/master/pmpro-addon-packages.php#L323

So you could filter on get_post_meta and check your other variable to change the price returned there.

Optionally, you could add a dropdown to the PMPro checkout page and use the pmpro_checkout_level filter to check the value of that dropdown and apply the correct price update.

Hope this gives you some ideas. If you start a thread in our members forum we can help you further.

How can give access to member who are paying one time payment to see any specific post, currently only members (monthly) can view all the posts, and we have this in our content-single


<?php if((pmpro_hasMembershipLevel('1'))) {

If I do <?php if((pmpro_hasMembershipLevel('2'))) which is free the everyone are seeing the post without even paying. So how I can validate on content-single.php that person has paid for this post?

thanks.

Yeah the pmpro_hasMembershipLevel function will just check if the user has that level.

You can use the pmpro_has_membership_access($post_id, $user_id) – or just pmpro_has_membership_access() for the current post and user – to see if a user has access to a post. The PMPro Addon Packages plugin is hooked into this to return false if the post has an addon packages price and the user hasn’t paid.

You can also use the pmproap_hasAccess($user_id, $post_id) – must pass params to this function and note the order – to check if a user specifically purchased a post through PMPro Addon Packages.

Hope this helps.

I got it, thank you Jason! I have one more requirement, how I can set different pricing of single post view for different type of subscriptions? For example, one post will be available for $4 for memberpro paid users and $10 for free users. thoughts?

You can use the get_post_metadata filter to filter the _pmproap_price post meta value where we store the addon price. So it would look something like this (untested):

`
//add $6 to the addon price for non-members
function my_pmpro_addon_price_filter($metadata, $object_id, $meta_key, $single)
{
if($meta_key == ‘_pmproap_price’ && function_exists(“pmpro_hasMembershipLevel”) && !pmpro_hasMembershipLevel())
$metadata = $metadata + 6;
return $metadata;
}
add_filter(‘get_post_metadata’, ‘my_pmpro_addon_price_filter’, 20, 4);
`

p.s. Stuff like this gets answered faster in our support forums right now.

I have added PMPro Addon Packages and want to add an expiration in a number of days to the purchase of a specific page. It appears from the changelog that this option is available but I am not sure how to activate it. Do I need to add some coding somewhere? If so can you tell me where and what?

== Changelog ==

= .4.2 =
* Added optional “expires in X days” global
* Fixed bug in pmpro_addon_packages shortcode.
* Supporting non-default wp-content directories. (Thanks, Adam-Moss on GitHub)

Thanks, Pam

In a custom plugin or your theme’s functions.php file, add code like this:

`
define(‘PMPROAP_EXP_DAYS’, 3);
`

3 is the number of days until access expires. If it is 0 or not set, access doesn’t expire.

Hi Jason, thanks. I am using WeaverII Pro and am not sure where I can add this that it will not be lost when the theme is upgraded. I am trying to get an answer from WeaverII support as well. Thanks

Hi Jason.

Firstly, thanks a lot for the plugin. Amazing work!

On my website I want to set up setter levels of membership based on time. 3 months, 6 Months 12 months.

But also, I would like to add Pay Per View where user can add Free Membership and pay for each post.

How I was hoping it will work is that only the Free Members would need to pay per post where as others would see it without any additional payment.

At the moment, regardless the membership level, each user has to make the additional payment.

Thank you for your your advice in advance.

Yeah, by default the addons plugin requires you to have one of the selected membership levels AND have purchased the page. You need some custom code to exclude some levels from having to pay. Post to the forums and we’ll get a code snippet for you.

Hi,

Is there a way to set the Pay Per View payment only for users from specific group and allow to view the content for any other group?

Hi! I have this challenge:
I have 8 levels with 8 different training programs (lets call them 1, 2, 3……8) I also have 3 different levels with 3 different diseases, lets call them A, B and C.
Som of the members of 1(trainingprogram 1) also has disease B, so I need that member to both access level 1 and B.
can this be done with some of the coding or an Add on?
It is important that many of the members only needs access to one level, but SOME needs access to two 🙂

Thank you so much in advance, you do such a great job!!!

Kind regards from Norway

If you are only charging one time payments (i.e. no recurring subscriptions) than you should be able to use PMPro Addon Packages to do this. You can put all of the content on the actual page purchased using PMPro Addon Packages or you can use some custom code to check if a user purchased a certain page before giving them access programatically. E.g. this integrates PMPro Addon Packages with WP Courseware: https://gist.github.com/strangerstudios/6d697728d7a5be494422

A note to my comment: I have installed the add on and can see that I can activate it under each post, but how do I fix this;
1: my members shall not pay more to see the extra site.
2: only some members shall see this page, how can I manage this? Since the feature is related to the post it seems the setting changes the post regardless of the members and levels?

A, B and C are only three different pages, so theres nothing more to it level-vise than this. This means it doesnt have to be a level, as long as some of the members(which I choose) in level 3 can have access to page A, B or C.

First thanks to give us this awesome plugin. However I need a feature for my client like below.

Suppose I have created 4 Levels. And People Select one level and when they select a level from this page http://forsalenoagent.com/fswp/packages/ They goes to this page http://forsalenoagent.com/fswp/membership-account/packages-checkout/?level=3

Here What I have done is that added a “Purchase Additional Services” Button So that when they click on that button they will be redirected to Additional service page Here forsalenoagent.com/fswp/?p=282 . If they select any of additional service then that additional service price should be added with that membership level price and then go to final checkout page .

Any Ideas ? I am trying to use woocommerce and PMpro woocommerce plugin to achieve this. But not getting the idea how to figure it out.

Thanks

The “PMPRO Add-On Package Settings” meta box only displays on Posts and Pages in the admin. How do we get this option enabled for custom post types?

Thanks

Hello PMPro. I have downloaded the bbpress pmpro addon from the WordPress repository and that seems to work fine restricting non registered users from seeing the forum i just set up. i have 2 questions though:

1) If ALL membership levels can view the forum, do i tick ALL the boxes, or only the lowest level box so anyone with that level and above can view the forum?

2) Where can i change the message users without the right level of acccess seen when they try to access a fourm. it currently states “You do not have the required membership level to access that forum.” whereas i want to display a message re the level of membership required to access it along with a login / register box – which is how it works on standard WordPress pages and posts.

2) This feature also works for normal WordPress posts too, so i can force users to either login or register in order to view the content. Where can i can modify the message users see telling them to login or register to view the content?

3) I am also keen to use this plugin to restrict access to ALL BUDDYPRESS PAGES so only members can view the activity stream, user groups and members profiles etc. However, although they are available in the page editor to use, the restrict members checkboxes DO NOT WORK when applied to pages created by Buddypress such as Activity, Groups and Members. To get this working would be a huge bonus to me as it seems all the other Buddypress Private members / community plugins are out of date and not compatible with the latest versions of WordPress and Buddypress.

Your swift assistance with these questions would be very much appreciated.

Thanks and Regards

Gail Kingswell Trueman
1LG.com

Some quick replies here – but if you need more in-depth support we offer that via a $97 support membership. Post your topic to our members only forum after registering.

1) You must specify all levels – PMPro Memberships Levels are not globally set up in “tiers” even if that is how your levels are structured.
2) To change that message, you must write a function to filter ‘pmpro_bbp_membership_msg’
3) Here’s a working tutorial that would serve as the basis for redirecting BuddyPress pages. https://gist.github.com/strangerstudios/3111478 This would need to be customized for your specific goals of what’s private, public and restricted by level.

Hi,

I’d like to change text displayed on the button. It’s currently set as “Purchase this content (Price)”.
And also change the second button, which is set as “Choose a membership level”.

How could I change those texts ?
I tried to modify this on the “pmpro-addon-packages/pmpro-addon-packages.php” file, line 292, but it does nothing… Should I change something else ?

Thanks in advance for your help 😉

Arnaud

I just pushed out version .6 of PMPro Addon Packages, which now has all text strings wrapped in the WP localizations functions (_e() and __()). This means that you can use the gettext filter to change that text without breaking the plugin for future updates.

Here’s an example of how you would change the text you referred to in this comment. You should be able to adjust it for other text you need to change.

https://gist.github.com/strangerstudios/dd8252a9c7a1c95eba3774af30226bab

If you need further help, open a thread in our member forums.

Hi, this is a great add-on. However I want to show a trailer video to people who have not purchased the add-on and then the full video to those who have.

Is there a shortcode/way for saying:

[not_purchased_addon id=”foo”]…not puchased content…TRAILER…[/not_purchased_addon ]
[has_purchased_addon id=”foo”]…has puchased content…FULL VERSION…[/has_purchased_addon ]

??

Thanks in advance

Hi there,

At this time we do not offer a feature that will allow you to display a trailer. It could be a good feature to have though. I will open up a feature request for it.

Is it possible to have a Buy One Time access option to purchase a certain Report (Post) ? And also allow monthly members access that report regardless if it has a one time purchase option ?

Ok but with the pmproap_all_access_levels is it possible to have a report where either you can subscribe for a month…pay yearly or pay just fo that report ?

Yes. Here it is exactly. Please try things out, hire a developer, or post to our member forums for further support like this.

Add Level 1, free
Add Level 2, $x/month
Add Level 3, $x/year

On the pages to sell individual or all access, check to require all 3 of those levels. Set an addon package price.

Then users can pay the package price, get the free level, and gain access to the post.

For all access, use the pmproap_all_access_levels filter and have the callback return array(2,3); //make sure the #s there match the level ids

I need to adapt a solution to the “rent” access to posts with videos, so that it is possible to assign specific value to each post and expiration period of the access. I almost got it using Addon Packages, but I did not find a way to assign an individual expiration period for each post.
I saw that there is an option for a global expiration of the packages with PMPROAP_EXP_DAYS, but this functionality did not even work. I inserted the code indicated in wp-config.php, and tried in the functions.php of the theme, but nothing happened and at the moment of acquiring the access, no mention appeared to the expiration period of the package. Is there anything else to set up for this functionality to work? And yet, how can you adapt it so that it is possible to assign individual expiration periods for the packages?
Thank you.

Find a WordPress developer.

Then say maybe the PMPro Addon Packages plugin is a good way to start with the PMPROAP_EXP_DAYS

You can also hook into update_user_metadata https://codex.wordpress.org/Plugin_API/Filter_Reference/update_(meta_type)_metadata

Check if the meta key is something like pmproap_post_id_{#}_exp_date. Extract the post ID from that, figure out what post it is, and set the expiration date accordingly.

If that doesn’t work for some reason, maybe there is a bug in the Addon Packages code. You can debug it, find the bug, and submit a Pull Request to get it fixed.

Good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *