WC_Order_Item_Tax::offsetSet()
Deprecated from version 4.4.0. It is no longer supported and can 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.
Return
null
. Nothing.
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 7.5.1
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 ); }