Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. /*
  2. Users with the upsell usermeta have access to everything.
  3. */
  4. function my_pmpro_has_membership_access_filter($hasaccess, $mypost, $myuser, $post_membership_levels)
  5. {
  6. $upsell = $myuser->upsell;
  7. if(!empty($upsell))
  8. {
  9. //could also check that $mypost is a specific page or in a specific group of pages here
  10. $hasaccess = true;
  11. }
  12.  
  13. return $hasaccess;
  14. }
  15. 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