woocommerce_customer_default_location
Filter the customer default location before geolocation.
Usage
add_filter( 'woocommerce_customer_default_location', 'wp_kama_woocommerce_customer_default_location_filter' );
/**
* Function for `woocommerce_customer_default_location` filter-hook.
*
* @param string $default_location_string The default location.
*
* @return string
*/
function wp_kama_woocommerce_customer_default_location_filter( $default_location_string ){
// filter...
return $default_location_string;
}
- $default_location_string(string)
- The default location.
Changelog
| Since 2.3.0 | Introduced. |
Where the hook is called
woocommerce_customer_default_location
woocommerce/includes/wc-core-functions.php 1224
apply_filters( 'woocommerce_customer_default_location', $default_location_string ?? '' )