WC_Order_Item_Shipping::offsetGetpublicWC 1.0ReturnTypeWillChange

Offset get: for ArrayAccess/Backwards compatibility.

Method of the class: WC_Order_Item_Shipping{}

No Hooks.

Returns

Mixed.

Usage

$WC_Order_Item_Shipping = new WC_Order_Item_Shipping();
$WC_Order_Item_Shipping->offsetGet( $offset );
$offset(string) (required)
Key.

WC_Order_Item_Shipping::offsetGet() code WC 10.4.3

public function offsetGet( $offset ) {
	if ( 'cost' === $offset ) {
		$offset = 'total';
	}
	return parent::offsetGet( $offset );
}