WC_Order_Item_Product::offsetSet PHP Method

offsetSet() public method

offsetSet for ArrayAccess/Backwards compatibility.
Deprecation: Add deprecation notices in future release.
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed
    public function offsetSet($offset, $value)
    {
        if ('line_subtotal' === $offset) {
            $offset = 'subtotal';
        } elseif ('line_subtotal_tax' === $offset) {
            $offset = 'subtotal_tax';
        } elseif ('line_total' === $offset) {
            $offset = 'total';
        } elseif ('line_tax' === $offset) {
            $offset = 'total_tax';
        } elseif ('line_tax_data' === $offset) {
            $offset = 'taxes';
        }
        parent::offsetSet($offset, $value);
    }