Tribe__Tickets__Tickets_View::get_event_rsvp_attendees( int $event_id, int|null $user_id = null )

Fetches from the Cached attendees list the ones that are relevant for this user and event.

Important to note that this method will return the attendees from RSVP.


Parameters

$event_id

(int) (Required) The Event ID we're checking.

$user_id

(int|null) (Optional) An Optional User ID.

Default value: null


Top ↑

Return

(array) Array with the RSVP attendees.


Top ↑

Source

File: src/Tribe/Tickets_View.php

	public function get_event_rsvp_attendees( $event_id, $user_id = null ) {
		$attendees = array();

		/** @var Tribe__Tickets__RSVP $rsvp */
		$rsvp = tribe( 'tickets.rsvp' );

		if ( ! $user_id ) {
			return $rsvp->get_attendees_by_id( $event_id );
		}

		return $rsvp->get_attendees_by_user_id( $user_id, $event_id );
	}