WC_Order::get_formatted_billing_address()publicWC 1.0

Get a formatted billing address for the order.

Метод класса: WC_Order{}

Возвращает

Строку.

Использование

$WC_Order = new WC_Order();
$WC_Order->get_formatted_billing_address( $empty_content );
$empty_content(строка)
Content to show if no address is present. @since 3.3.0.
По умолчанию: ''

Код WC_Order::get_formatted_billing_address() WC 8.7.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 );
}