Tribe__Tickets__Tickets::get_attendees_from_module( array $attendees, int $post_id )
Get attendee data for attendees from the current module.
Contents
Parameters
- $attendees
-
(array) (Required) Attendee objects or IDs.
- $post_id
-
(int) (Required) Parent post ID.
Return
(array) The attendee data for attendees.
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;
}
Changelog
| Version | Description |
|---|---|
| 4.10.6 | Introduced. |