WC_Order::set_address_prop PHP Method

set_address_prop() protected method

Sets a prop for a setter method.
Since: 2.7.0
protected set_address_prop ( string $prop, string $address = 'billing', mixed $value )
$prop string Name of prop to set.
$address string Name of address to set. billing or shipping.
$value mixed Value of the prop.
    protected function set_address_prop($prop, $address = 'billing', $value)
    {
        if (array_key_exists($prop, $this->data[$address])) {
            if (true === $this->object_read) {
                if ($value !== $this->data[$address][$prop] || isset($this->changes[$address]) && array_key_exists($prop, $this->changes[$address])) {
                    $this->changes[$address][$prop] = $value;
                }
            } else {
                $this->data[$address][$prop] = $value;
            }
        }
    }
WC_Order