WC_Order::get_formatted_billing_address
Get a formatted billing address for the order.
Method of the class: WC_Order{}
Hooks from the method
Returns
String.
Usage
$WC_Order = new WC_Order(); $WC_Order->get_formatted_billing_address( $empty_content );
- $empty_content(string)
- Content to show if no address is present. @since 3.3.0.
Default:''
WC_Order::get_formatted_billing_address() WC Order::get formatted billing address code WC 10.5.0
public function get_formatted_billing_address( $empty_content = '' ) {
$raw_address = apply_filters( 'woocommerce_order_formatted_billing_address', $this->get_address( 'billing' ), $this );
$address = WC()->countries->get_formatted_address( $raw_address );
/**
* Filter orders formatted billing address.
*
* @since 3.8.0
* @param string $address Formatted billing address string.
* @param array $raw_address Raw billing address.
* @param WC_Order $order Order data. @since 3.9.0
*/
return apply_filters( 'woocommerce_order_get_formatted_billing_address', $address ? $address : $empty_content, $raw_address, $this );
}