Warning: This method has been deprecated.

WC_Order_Item_Tax::offsetSet( string $offset, mixed $value )

OffsetSet for ArrayAccess/Backwards compatibility.


Description Description


Parameters Parameters

$offset

(Required) Offset.

$value

(Required) Value.


Top ↑

Source Source

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

	public function offsetSet( $offset, $value ) {
		if ( 'tax_amount' === $offset ) {
			$offset = 'tax_total';
		} elseif ( 'shipping_tax_amount' === $offset ) {
			$offset = 'shipping_tax_total';
		}
		parent::offsetSet( $offset, $value );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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