woocommerce_order_get_formatted_shipping_address filter-hookWC 3.8.0

Filter orders formatted shipping address.

Usage

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(string)
Formatted shipping address string.
$raw_address(array)
Raw shipping address.
$order(WC_Order)
Order data. @since 3.9.0

Changelog

Since 3.8.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.