WordPress at Your Fingertips
function is not described

WC_Abstract_Legacy_Order::set_address() public WC 1.0

Set the customer address.

{} It's a method of the class: WC_Abstract_Legacy_Order{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Abstract_Legacy_Order = new WC_Abstract_Legacy_Order();
$WC_Abstract_Legacy_Order->set_address( $address, $type );
$address(array) (required)
Address data.
$type(string)
billing or shipping.
Default: 'billing'

Code of WC_Abstract_Legacy_Order::set_address() WC 5.7.1

public function set_address( $address, $type = 'billing' ) {
	foreach ( $address as $key => $value ) {
		update_post_meta( $this->get_id(), "_{$type}_" . $key, $value );
		if ( is_callable( array( $this, "set_{$type}_{$key}" ) ) ) {
			$this->{"set_{$type}_{$key}"}( $value );
		}
	}
}