Tribe__Tickets_Plus__Meta__Storage::get_meta_data_for( int $id, null|string $hash_key = null )

Gets the ticket data associated to a specified ticket.


Parameters

$id

(int) (Required) The ticket ID.

$hash_key

(null|string) (Optional) The hash key.

Default value: null


Top ↑

Return

(array|mixed) Either the data stored for the specified id or an empty array.


Top ↑

Source

File: src/Tribe/Meta/Storage.php

	public function get_meta_data_for( $id ) {
		if ( isset( $this->data_cache[ $id ] ) ) {
			return $this->data_cache[ $id ];
		}

		$data = $this->get_meta_data( $id );

		if ( ! isset( $data[ intval( $id ) ] ) ) {
			return array();
		}

		$data = array( $id => $data[ $id ] );

		$this->data_cache[ $id ] = $data;

		return $data;
	}