WC_Order_Item::offsetUnset( string $offset )
OffsetUnset for ArrayAccess.
Description Description
Parameters Parameters
- $offset
-
(Required) Offset.
Source Source
File: includes/class-wc-order-item.php
public function offsetUnset( $offset ) { $this->maybe_read_meta_data(); if ( 'item_meta_array' === $offset || 'item_meta' === $offset ) { $this->meta_data = array(); return; } if ( array_key_exists( $offset, $this->data ) ) { unset( $this->data[ $offset ] ); } if ( array_key_exists( $offset, $this->changes ) ) { unset( $this->changes[ $offset ] ); } $this->delete_meta_data( $offset ); }