Tribe__Tickets__Commerce__PayPal__Main::get_attendees_by_id( $post_id, null $post_type = null )
Get attendees by id and associated post type or default to using $post_id
Contents
Parameters
- $post_id
-
(Required)
- $post_type
-
(null) (Optional)
Default value: null
Return
(array|mixed)
Source
File: src/Tribe/Commerce/PayPal/Main.php
public function get_attendees_by_id( $post_id, $post_type = null ) {
// PayPal Ticket Orders are a unique hash
if ( ! is_numeric( $post_id ) ) {
$post_type = 'tpp_order_hash';
}
if ( ! $post_type ) {
$post_type = get_post_type( $post_id );
}
switch ( $post_type ) {
case $this->attendee_object:
return $this->get_attendees_by_attendee_id( $post_id );
break;
case 'tpp_order_hash':
return $this->get_attendees_by_order_id( $post_id );
break;
case $this->ticket_object:
return $this->get_attendees_by_ticket_id( $post_id );
break;
default:
return $this->get_attendees_by_post_id( $post_id );
break;
}
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |