LLMS_Event::get_meta( string $key = null, bool $cache = true )

Retrieve metadata.


Parameters Parameters

$key

(string) (Optional) Metadata key, if omitted returns an associative array of all metadata as key=>val pairs.

Default value: null

$cache

(bool) (Optional) If true, uses cached data when available.

Default value: true


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/models/class-llms-event.php

	public function get_meta( $key = null, $cache = true ) {

		$all = $this->get( 'meta', $cache );
		$all = empty( $all ) ? array() : json_decode( $all, true );

		if ( ! $key ) {
			return $all;
		}

		return isset( $all[ $key ] ) ? $all[ $key ] : null;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.36.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.