• Resolved c_lawlz

    (@c_lawlz)


    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)
  • Plugin Support Darian

    (@d0153)

    Hi @c_lawlz

    Thanks for reaching out.

    It seems the other topic/thread you submitted is somehow related to our PRO plugin. By any chance, do you have an active license for The Events Calendar PRO? If so, unfortunately, we cannot provide support in this forum for?premium users.

    For us to help you better, please open a Support Ticket on our Help Desk.

    You’ll hear from one of my colleagues soon!

    Thread Starter c_lawlz

    (@c_lawlz)

    Hi Darian,

    Thank you. We do have a license, I’ll contact support there.

    Plugin Support Darian

    (@d0153)

    Hi @c_lawlz

    That’s great! I’d be closing this thread now, If you have other concerns or issues you need help with, please open a Support Ticket on our Help Desk.

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.