Merge pull request #25446 from woocommerce/fix/default-custom-location

Fixed default value for wc_get_customer_default_location()
This commit is contained in:
Claudio Sanches 2020-01-21 15:09:22 -03:00 committed by GitHub
commit 4434c4706e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1118,7 +1118,7 @@ function wc_get_base_location() {
* @return array
*/
function wc_get_customer_default_location() {
$set_default_location_to = get_option( 'woocommerce_default_customer_address', 'geolocation' );
$set_default_location_to = get_option( 'woocommerce_default_customer_address', 'base' );
$default_location = '' === $set_default_location_to ? '' : get_option( 'woocommerce_default_country', '' );
$location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', $default_location ) );