WC_Order_Item_Tax::offsetSet
Deprecated since 4.4.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
OffsetSet for ArrayAccess/Backwards compatibility.
Method of the class: WC_Order_Item_Tax{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Order_Item_Tax = new WC_Order_Item_Tax(); $WC_Order_Item_Tax->offsetSet( $offset, $value );
- $offset(string) (required)
- Offset.
- $value(mixed) (required)
- Value.
Changelog
| Deprecated since | 4.4.0 |
WC_Order_Item_Tax::offsetSet() WC Order Item Tax::offsetSet code WC 10.7.0
public function offsetSet( $offset, $value ) {
wc_deprecated_function( 'WC_Order_Item_Tax::offsetSet', '4.4.0', '' );
if ( 'tax_amount' === $offset ) {
$offset = 'tax_total';
} elseif ( 'shipping_tax_amount' === $offset ) {
$offset = 'shipping_tax_total';
}
parent::offsetSet( $offset, $value );
}