• Resolved dbacksbst

    (@dbacksbst)


    I am trying to figure out a way to allow users to subscribe to a specific category of events.

    Currently, my goal is to simply generate an .ics file containing the filtered events. I found the following filter hooks, which looked promising:

    // File: the-events-calendar/src/Tribe/iCal.php
    // Line: 968
    protected function get_events_list( $args = [], $query = null ) {
      $args = apply_filters( 'tribe_events_ical_events_list_args', $args );
    
      $query = apply_filters( 'tribe_events_ical_events_list_query', $query );
    
    ..rest of function...
    }

    However, I cannot figure out any way to trigger them. The get_events_list() function is only called in the get_events_posts() function (same file), but the line(s) that call it are never reached because $this->post is always truthy:

    // File: the-events-calendar/src/Tribe/iCal.php
    // Line: 369
    protected function get_event_posts() {
      if ( $this->post ) {
        return is_array( $this->post ) ? $this->post : [ $this->post ];
      }
    
    ...rest of function..
    }

    I have tried the following URLs, but none have triggered the filters mentioned above:

    Can you offer any advice on how to trigger these hooks? Or else, how to modify the output of the ical feed?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to modify query args for ICS export’ is closed to new replies.