Tribe__Tickets__Tickets::get_attendees_from_module( array $attendees, int $post_id )

Get attendee data for attendees from the current module.


Parameters

$attendees

(array) (Required) Attendee objects or IDs.

$post_id

(int) (Required) Parent post ID.


Top ↑

Return

(array) The attendee data for attendees.


Top ↑

Source

File: src/Tribe/Tickets.php

		public function get_attendees_from_module( $attendees, $post_id = 0 ) {
			$attendees_from_module = [];

			foreach ( $attendees as $attendee ) {
				$attendee_data = $this->get_attendee( $attendee, $post_id );

				if ( ! $attendee_data ) {
					continue;
				}

				// Set the `ticket_exists` flag on attendees if the ticket they are associated with does not exist.
				$attendee_data['ticket_exists'] = ! empty( $attendee_data['product_id'] ) && get_post( $attendee_data['product_id'] );

				$attendees_from_module[] = $attendee_data;
			}

			return $attendees_from_module;
		}

Top ↑

Changelog

Changelog
Version Description
4.10.6 Introduced.