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);

Parameters

$hasaccess
bool
mypost
WP_Post
$myuser
WP_User
$post_membership_level
array

Source

File: https://github.com/strangerstudios/paid-memberships-pro/blob/master/includes/content.php

View in Source Code