WC_Order_Item::offsetExists() public WC 1.0
OffsetExists for ArrayAccess.
{} Это метод класса: WC_Order_Item{}
Хуков нет.
Возвращает
true/false.
Использование
$WC_Order_Item = new WC_Order_Item(); $WC_Order_Item->offsetExists( $offset );
- $offset(строка) (обязательный)
- Offset.
Код WC_Order_Item::offsetExists() WC Order Item::offsetExists WC 5.0.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' ) );
}