-1

I'm using the Event calendar plugin and I have recurring events on my WP site. I want to get all the start day, date and star time - start end for the current series of events. So basically, i want to show all dates of the events in one shot

September 24 @ 10:00 AM - 5:00 PM September 25 @ 10:00 AM - 5:00 PM

Trying to use this function here. Please help

    function tribe_get_recurrence_start_dates( $post_id = null ) {
    $post_id = Tribe__Events__Main::postIdHelper( $post_id );

    return Tribe__Events__Pro__Recurrence__Meta::get_start_dates( $post_id );
    }
Ashtheslayer
  • 105
  • 1
  • 11

1 Answers1

0

Maybe it might help you:

$series_post = tec_event_series( $event_id );
if ( !$series_post instanceof WP_Post ) {
    return;
}

$recurring_events_ids = tribe_get_events( [ 
    'series' => $series_post->ID, 
    'fields'=> 'ids', 
    'orderby' => 'event_date'] 
);

foreach ($recurring_events_ids as $id) {
    echo tribe_get_start_date($id);
    echo tribe_get_end_date($id);
}
Roarr
  • 1