Hooks-FiltersThanks to Jessica Oros we have just published a new and improved Hooks and Filters library. Our previous page was severely outdated. This new list details the various hooks (do_action() and filters (apply_filters()) added or used by Paid Memberships Pro, organized alphabetically.

Browse the full list alphabetically or by source file. Each hook and filter has a detail page providing a description, parameters, examples, related blog posts, and code recipes (PMPro Members Only).

We still need to add a few of the newer hooks and filters and to flesh out the examples and descriptions a bit more, but this new resource is much improved from our older list.

View the Hooks and Filters Library

This entry was posted by Jason Coleman in General and tagged . Bookmark the permalink. Last updated: April 16, 2014. Titled Bigger, Better, Badder Action and Filter Hooks Documentation

Comments (10)

Looks great ๐Ÿ™‚ Is there a way to list on a user profile page all the post from categories to which he or she has an access?
I just started to test the plugin, so sorry if there is an obvious way to do that I’m unaware of. Thanks.

There isn’t right now. We’ve gotten a few requests of this sort. Because WP can have many kinds of content and content can be locked down in various ways, this is actually hard to put together in a way that will work for everyone.

The easiest solution is to lock posts down by category and then the category archive is exactly what you want.

Another option, if you are only using default WP pages and setting level restrictions on each page, is to use custom code to loop through the wp_pmpro_memberships_pages table and turn that into a list of links.

Thanks! Like WordPress itself, we are nourishing the PMPro platform and building business opportunities on top of it. So far people are more than willing to pay for the services around PMPro so the code can remain free.

Well, I’m planning to apply your strategy for the upcoming theme I’m releasing, Membership Site Theme, which will be like Paid Memberships Pro be free and with a backend strategy in place. Out of curiosity, any plans on allowing affiliates to join up to help promote the PMP Membership (the support forum, not the plugin itself)?

Hi Jason, Thank you for your reply. I have decided to have one post per category, so I’ve come up with a support of other people, with the code below. It returns link to a post, but only when a user has an access to one post. If he has access to more than one, then it doesn’t work (blank). I’ve decided to share it, so maybe it would also somehow help you to come up with a solution.


if( $sanitized_title ) {
$args = array(‘post_type’ => ‘post’, ‘category_name ‘ => $sanitized_title);
$query = new WP_Query( $args );

if( $query->have_posts() ) {
while( $query->have_posts() ) {
<a href="”>

Do you have any ideas how to fix it?

All the best


To sum up: A member can get an access to a post in a locked posts category. My goal is to display posts to which a member has an access on his profile page. (I have in each category one post, because what I really want is to have unlockable posts).

I need to check member’s level using the function pmpro_hasMembershipLevel(). If the answer is yes, then I need to see which categories that level has access to by using pmpro_getMembershipCategories(), and then I need to display posts inside of them.

I’ve put the current code here: http://pastebin.com/bNye0N2i

I’m new to PHP, so sorry if the code is not of the best quality.

Could you please help me if you know how to do it?

Ok, I think I understand now. It is not possible am I right? If a user buys a membership-level then he is on that one level only.

I have tried to create multiple membership levels, each had one category, in each category there was only one post. So I wanted to allow a user to have multiple membership levels assigned to his account, and that’s not possible. Correct me please if I’m wrong. I’m trying to test the plugin and see if it fits my website and I can do with it what I want.

Leave a Reply

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