woocommerce_order_get_formatted_billing_address хук-фильтрWC 3.8.0

Filter orders formatted billing address.

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

add_filter( 'woocommerce_order_get_formatted_billing_address', 'wp_kama_woocommerce_order_get_formatted_billing_address_filter', 10, 3 );

/**
 * Function for `woocommerce_order_get_formatted_billing_address` filter-hook.
 * 
 * @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 string
 */
function wp_kama_woocommerce_order_get_formatted_billing_address_filter( $address, $raw_address, $order ){

	// filter...
	return $address;
}
$address(строка)
Formatted billing address string.
$raw_address(массив)
Raw billing address.
$order(WC_Order)
Order data. @since 3.9.0

Список изменений

С версии 3.8.0 Введена.

Где вызывается хук

WC_Order::get_formatted_billing_address()
woocommerce_order_get_formatted_billing_address
woocommerce/includes/class-wc-order.php 952
return apply_filters( 'woocommerce_order_get_formatted_billing_address', $address ? $address : $empty_content, $raw_address, $this );

Где используется хук в WooCommerce

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