Tribe__Tickets__REST__V1__Post_Repository::get_ticket_end_date( int $ticket_id, bool $get_details = false )
Returns a ticket end date.
Contents
Parameters
- $ticket_id
-
(int) (Required) The ticket ID.
- $get_details
-
(bool) (Optional) Whether to get the date in string format (
false) or the full details (true).Default value: false
Return
(string|array)
Source
File: src/Tribe/REST/V1/Post_Repository.php
public function get_ticket_end_date( $ticket_id, $get_details = false ) {
/** @var Tribe__Tickets__Tickets_Handler $handler */
$handler = tribe( 'tickets.handler' );
$end_date = get_post_meta( $ticket_id, $handler->key_end_date, true );
return $get_details
? $this->get_date_details( $end_date )
: $end_date;
}
Changelog
| Version | Description |
|---|---|
| 4.8 | Introduced. |