Tribe__Tickets_Plus__Meta__Storage::update_meta_data( mixed $data, null|int $id = null, null|string $hash_key = null )

Update meta in transient.


Parameters

$data

(mixed) (Required) Metadata to save. Will be cast to array if not already.

$id

(null|int) (Optional) Post ID (or null if using current post). Note: This is only for context, it does not affect what is saved.

Default value: null

$hash_key

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

Default value: null


Top ↑

Return

(boolean) Whether the transient was saved.


Top ↑

Source

File: src/Tribe/Meta/Storage.php

	public function update_meta_data( $data, $id = null, $hash_key = null ) {
		if ( empty( $data ) ) {
			return $this->delete_meta_data( $id, $hash_key );
		}

		// Get the transient name.
		$transient_name = $this->get_transient_name( $id, $hash_key );

		if ( empty( $transient_name ) ) {
			return false;
		}

		$this->data_cache = $data;

		return set_transient( $transient_name, $data, $this->ticket_meta_expire_time );
	}

Top ↑

Changelog

Changelog
Version Description
4.11.0 Introduced.