WordPress at Your Fingertips
function is not described

WC_Order_Item::offsetExists() public WC 1.0

OffsetExists for ArrayAccess.

{} It's a method of the class: WC_Order_Item{}

No Hooks.

Return

true|false.

Usage

$WC_Order_Item = new WC_Order_Item();
$WC_Order_Item->offsetExists( $offset );
$offset(string) (required)
Offset.

Code of WC_Order_Item::offsetExists() WC 5.6.0

public function offsetExists( $offset ) {
	$this->maybe_read_meta_data();
	if ( 'item_meta_array' === $offset || 'item_meta' === $offset || array_key_exists( $offset, $this->data ) ) {
		return true;
	}
	return array_key_exists( $offset, wp_list_pluck( $this->meta_data, 'value', 'key' ) ) || array_key_exists( '_' . $offset, wp_list_pluck( $this->meta_data, 'value', 'key' ) );
}