WC_Order::get_address() public WC 2.4.0
Returns the requested address in raw, non-formatted way. Note: Merges raw data with get_prop data so changes are returned too.
{} It's a method of the class: WC_Order{}
Hooks from the method
Return
Array. The stored address after filter.
Usage
$WC_Order = new WC_Order(); $WC_Order->get_address( $type );
- $type(string)
- Billing or shipping. Anything else besides 'billing' will return shipping address.
Changelog
Since 2.4.0 | Introduced. |
Code of WC_Order::get_address() WC Order::get address WC 5.0.0
public function get_address( $type = 'billing' ) {
return apply_filters( 'woocommerce_get_order_address', array_merge( $this->data[ $type ], $this->get_prop( $type, 'view' ) ), $type, $this );
}