WC_Order_Item_Shipping::offsetGet()publicWC 1.0ReturnTypeWillChange

Offset get: for ArrayAccess/Backwards compatibility.

Method of the class: WC_Order_Item_Shipping{}

No Hooks.

Return

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 8.7.0

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