woocommerce_get_country_locale_default

woocommerce_get_country_locale_default

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_get_country_locale_default') is found 1 times:

  • /includes/class-wc-countries.php line 1672
    1669
    1670
    1671
    1672
    1673
    1674
    1675
    1676
    1677
    $this->locale = array_intersect_key( $this->locale, array_merge( $this->get_allowed_countries(), $this->get_shipping_countries() ) );
     
    // Default Locale Can be filtered to override fields in get_address_fields(). Countries with no specific locale will use default.
    $this->locale['default'] = apply_filters( 'woocommerce_get_country_locale_default', $this->get_default_address_fields() );
     
    // Filter default AND shop base locales to allow overrides via a single function. These will be used when changing countries on the checkout.
    if ( ! isset( $this->locale[ $this->get_base_country() ] ) ) {
        $this->locale[ $this->get_base_country() ] = $this->locale['default'];
    }

See this hook used in plugins: