Use this hook to filter the membership access of a given post. This overrides the output of the pmpro_has_membership_access() function and returns the boolean true or false, the WP_Post object, the  WP_User object, and an array of the membership levels required for the post.

apply_filters("pmpro_has_membership_access_filter", bool $hasaccess, WP_post $mypost, WP_user $myuser, array $post_membership_levels);





View in Source Code

Related Articles and Recipes

Always Allow Admin Access to Member Restricted Posts By Kimberly Coleman

Unlock Membership Access to All Restricted Content Without Updating Posts By Andrew Lima

Block or Pause a Specific Member’s Access to Restricted Content By Kimberly Coleman

Hide Previous Content From New Members By Jason Coleman

How to allow visitor access to specific posts in a Membership-restricted category. By Kimberly Coleman

Allow Authors to View Their Posts Regardless of Membership Level By Kimberly Coleman

Lock or Unlock Posts Based on Age and Post Date By Kimberly Coleman

Lock Posts to Members-Only After Specific Timeframe By Kimberly Coleman

Sister Plugin for Addon Packages: Apply Parent Page’s Protection to All Child Pages By Kimberly Coleman

Sell Access to Post Categories “a la carte” Using Price-Adjusting User Fields By Kimberly Coleman

Sell Access to a Single Post Category Using the Addon Packages Plugin By Jason Coleman

How To Have a Paid Memberships Pro level with access to EVERYTHING. By Jason Coleman