Tribe__Tickets__REST__V1__Post_Repository::get_ticket_end_date( int $ticket_id, bool $get_details = false )

Returns a ticket end date.


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


Top ↑

Return

(string|array)


Top ↑

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;
	}

Top ↑

Changelog

Changelog
Version Description
4.8 Introduced.