Returns an array of membership requirements/restrictions for an individual post. If the post has individual restrictions applied, then those will be returned. If not, then the global post type restrictions are checked and returned. Note this function does not return associated term restrictions; those must be retrieved separately with rcp_get_term_restrictions().


  • $post_id (int) - ID of the post to check.

Return values:

  • array
    • membership_levels (string|array) - Can be a string "any-paid", "any", or array of membership level IDs.
    • access_level (int) - Access level required.
    • user_level (array) - Array of required user role(s).
Powered by Zendesk