Tribe__Tickets_Plus__Commerce__EDD__Main::get_attendees_by_id( int $post_id, null $post_type = null )
Get attendees by id and associated post type or default to using $post_id
Contents
Parameters
- $post_id
-
(int) (Required)
- $post_type
-
(null) (Optional)
Default value: null
Return
(array|mixed)
Source
File: src/Tribe/Commerce/EDD/Main.php
public function get_attendees_by_id( $post_id, $post_type = null ) {
if ( ! $post_type ) {
$post_type = get_post_type( $post_id );
}
switch ( $post_type ) {
case $this->ticket_object:
$attendees = $this->get_attendees_by_product_id( $post_id );
break;
case $this->attendee_object:
$attendees = $this->get_all_attendees_by_attendee_id( $post_id );
break;
case $this->order_object:
$attendees = $this->get_attendees_by_order_id( $post_id );
break;
default:
$attendees = $this->get_attendees_by_post_id( $post_id );
break;
}
return $attendees;
}