woocommerce_customer_default_location_array filter-hookWC 2.3.0

Filter the customer default location after geolocation.

Usage

add_filter( 'woocommerce_customer_default_location_array', 'wp_kama_woocommerce_customer_default_location_array_filter' );

/**
 * Function for `woocommerce_customer_default_location_array` filter-hook.
 * 
 * @param array $customer_location The customer location with keys 'country' and 'state'.
 *
 * @return array
 */
function wp_kama_woocommerce_customer_default_location_array_filter( $customer_location ){

	// filter...
	return $customer_location;
}
$customer_location(array)
The customer location with keys 'country' and 'state'.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

wc_get_customer_default_location()
woocommerce_customer_default_location_array
woocommerce/includes/wc-core-functions.php 1414
return apply_filters( 'woocommerce_customer_default_location_array', $default_location );

Where the hook is used in WooCommerce

Usage not found.