WordPress at Your Fingertips
function is not described

WC_Order_Item_Product::offsetGet() public WC 1.0

OffsetGet for ArrayAccess/Backwards compatibility.

{} It's a method of the class: WC_Order_Item_Product{}

No Hooks.

Return

Mixed.

Usage

$WC_Order_Item_Product = new WC_Order_Item_Product();
$WC_Order_Item_Product->offsetGet( $offset );
$offset(string) (required)
Offset.

Code of WC_Order_Item_Product::offsetGet() WC 5.7.0

public function offsetGet( $offset ) {
	if ( 'line_subtotal' === $offset ) {
		$offset = 'subtotal';
	} elseif ( 'line_subtotal_tax' === $offset ) {
		$offset = 'subtotal_tax';
	} elseif ( 'line_total' === $offset ) {
		$offset = 'total';
	} elseif ( 'line_tax' === $offset ) {
		$offset = 'total_tax';
	} elseif ( 'line_tax_data' === $offset ) {
		$offset = 'taxes';
	} elseif ( 'qty' === $offset ) {
		$offset = 'quantity';
	}
	return parent::offsetGet( $offset );
}