Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Users with the upsell usermeta have access to everything.
- */
- function my_pmpro_has_membership_access_filter($hasaccess, $mypost, $myuser, $post_membership_levels)
- {
- $upsell = $myuser->upsell;
- if(!empty($upsell))
- {
- //could also check that $mypost is a specific page or in a specific group of pages here
- $hasaccess = true;
- }
- return $hasaccess;
- }
- add_filter('pmpro_has_membership_access_filter', 'my_pmpro_has_membership_access_filter', 10, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement