Tribe__Tickets__Commerce__PayPal__Order::get_meta( string|null $key = null )

Returns the value of a meta field set on the order or all the meta set on the Order.

This is a database-light operation: meta is read from the object, not the database; use hydrate methods to populate the meta.

See also


Top ↑

Parameters

$key

(string|null) (Optional)

Default value: null


Top ↑

Return

(array|mixed) Either a specif meta value, null if no value is set for the key; all the Order meta if $key is null.


Top ↑

Source

File: src/Tribe/Commerce/PayPal/Order.php

	public function get_meta( $key = null ) {
		if ( null === $key ) {
			return $this->meta;
		}

		return isset( $this->meta[ $key ] )
			? $this->meta[ $key ]
			: get_post_meta( $this->post_id, $key, true );
	}