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

Filter orders formatted shipping address.

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

add_filter( 'woocommerce_order_get_formatted_shipping_address', 'wp_kama_woocommerce_order_get_formatted_shipping_address_filter', 10, 3 );

/**
 * Function for `woocommerce_order_get_formatted_shipping_address` filter-hook.
 * 
 * @param string   $address     Formatted shipping address string.
 * @param array    $raw_address Raw shipping address.
 * @param WC_Order $order       Order data. @since 3.9.0
 *
 * @return string
 */
function wp_kama_woocommerce_order_get_formatted_shipping_address_filter( $address, $raw_address, $order ){

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

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

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

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

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

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

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