WC_Order_Item_Shipping::offsetGet │ public │ WC 1.0 │ ReturnTypeWillChange

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 11.1.2

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