Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::exists()publicWC 1.0

Allows checking whether a key exists.

Method of the class: AssetDataRegistry{}

No Hooks.

Return

true|false. Whether the key exists in the current data registry.

Usage

$AssetDataRegistry = new AssetDataRegistry();
$AssetDataRegistry->exists( $key );
$key(string) (required)
The key to check if exists.

AssetDataRegistry::exists() code WC 8.7.0

public function exists( $key ) {
	return array_key_exists( $key, $this->data );
}