woocommerce_customer_default_location_array
Filter the customer default location after geolocation.
Использование
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(массив)
- The customer location with keys 'country' and 'state'.
Список изменений
С версии 2.3.0 | Введена. |
Где вызывается хук
woocommerce_customer_default_location_array
woocommerce/includes/wc-core-functions.php 1391
return apply_filters( 'woocommerce_customer_default_location_array', $default_location );