WC_Order_Item_Fee::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_Fee{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Order_Item_Fee = new WC_Order_Item_Fee(); $WC_Order_Item_Fee->offsetSet( $offset, $value );
- $offset(string) (required)
- Offset.
- $value(mixed) (required)
- Value.
Changelog
| Deprecated since | 4.4.0 |
WC_Order_Item_Fee::offsetSet() WC Order Item Fee::offsetSet code WC 10.7.0
public function offsetSet( $offset, $value ) {
wc_deprecated_function( 'WC_Order_Item_Fee::offsetSet', '4.4.0', '' );
if ( 'line_total' === $offset ) {
$offset = 'total';
} elseif ( 'line_tax' === $offset ) {
$offset = 'total_tax';
} elseif ( 'line_tax_data' === $offset ) {
$offset = 'taxes';
}
parent::offsetSet( $offset, $value );
}