Events “Upcoming” List View – wrong dates when filtering with meta query
-
Hello,
We are having an issue when using a meta query (checking if a specific meta key exists) with the tribe_events_views_v2_view_repository_args filter. Events in the “Upcoming” list view are in the wrong dates, and it’s showing events that have passed. This does not occur with the month view, day view, or using a specific date on the list view. The date on the lefthand side will match the last specific date you clicked on when in the day view.
No worries if this is outside of the scope of this support forum, but I wanted to ask just in case. I’ll post the code below
Thank you,
Corey// Start Group Visibility Restriction add_filter( 'tribe_events_views_v2_view_repository_args', 'tec_exclude_events_group', 10, 3 ); function tec_exclude_events_group( $args, $context, $view ) { $args = group_limiter($args); return $args; } function group_limiter($args) { $userid = get_current_user_id(); $lms_user_group = learndash_get_users_group_ids($userid); $i = 0; foreach ($lms_user_group as $groupID) { $args['meta_query'][$i] = array( 'key' => '_ld_groups_membership_group_'.$groupID, 'compare' => 'EXISTS', ); $i++; }; if($i > 1): $args['meta_query']['relation'] = "OR"; endif; return $args; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Events “Upcoming” List View – wrong dates when filtering with meta query’ is closed to new replies.