WC_Order_Item_Tax::offsetGet( string $offset )

O for ArrayAccess/Backwards compatibility.


Description Description


Parameters Parameters

$offset

(Required) Offset.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/class-wc-order-item-tax.php

	public function offsetGet( $offset ) {
		if ( 'tax_amount' === $offset ) {
			$offset = 'tax_total';
		} elseif ( 'shipping_tax_amount' === $offset ) {
			$offset = 'shipping_tax_total';
		}
		return parent::offsetGet( $offset );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.