WC_Order::set_address_prop( string $prop, string $address, mixed $value )
Sets a prop for a setter method.
Description Description
Parameters Parameters
- $prop
-
(Required) Name of prop to set.
- $address
-
(Required) Name of address to set. billing or shipping.
- $value
-
(Required) Value of the prop.
Source Source
File: includes/class-wc-order.php
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; } } }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |