To shed more light on this issue, there is a conflict. In the method Groups_Restrict_Categories::user_can_read()
, which is used to determine if we should redirect or not when viewing something. Part of this function is getting the terms of the current post, $terms = get_the_terms( $post_id, $taxonomy );
. The issue is that in this same class, there’s a method Groups_Restrict_Categories::list_terms_exclusions()
, which generically disallows retrieving restricted terms. So the conflict:
user_can_read()
gets the posts terms and sees if they’re disallowed
list_terms_exclusions()
prevents user_can_read()
from getting the post terms to see if disallowed.
The current, temporary fix, was to add remove_filter( 'list_terms_exclusions', array( 'Groups_Restrict_Categories', 'list_terms_exclusions' ) );
right before user_can_read()
get the terms, and then add it back after.
Please try to fix this before the next release, I would much appreciate it.
Thanks for the free plugin guys, it is really great.