strangerstudios / pmpro-events

Offer members-only events using popular events plugins and Paid Memberships Pro.
https://www.paidmembershipspro.com/add-ons/events-for-members-only/
8 stars 10 forks source link

The Events Calendar: Member events displayed in archive view to non-members #27

Closed ipokkel closed 1 year ago

ipokkel commented 4 years ago

Need to filter the display of the post content for a restricted event on the "archive" page (/events) in list or calendar view.

The Single Event is properly respecting Advanced Settings (whether to show excerpts or hide).

To reproduce:

CmumYghn4g firefox_iem3fVdylO

andrewlimaza commented 3 years ago

UPDATE I've recreated something similar.

On initial load, it shows the events but then if you refresh the page it is hidden correctly. To be honest I think it's caching from the Events Calendar.

andrewlimaza commented 3 years ago

This issue only occurs when switching views from List > Month > Day etc.

andrewlimaza commented 3 years ago

Looking into this, it seems that the Events Calendar uses AJAX to switch between views and the content doesn't get filtered by the WP Query.

andrewlimaza commented 3 years ago

Ref: tribe_repository_default_query_args filter.