WordPress at Your Fingertips
function is not described

WC_API_Orders::update_address() protected WC 1.0

Update address.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->update_address( $order, $posted, $type );
$order(WC_Order) (required)
-
$posted(array) (required)
-
$type(string)
-
Default: 'billing'

Code of WC_API_Orders::update_address() WC 5.6.0

protected function update_address( $order, $posted, $type = 'billing' ) {
	foreach ( $posted as $key => $value ) {
		if ( is_callable( array( $order, "set_{$type}_{$key}" ) ) ) {
			$order->{"set_{$type}_{$key}"}( $value );
		}
	}
}