woocommerce_formatted_address_force_country_display

woocommerce_formatted_address_force_country_display

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_formatted_address_force_country_display') is found 1 times:

  • /includes/class-wc-countries.php line 648
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    // Handle full country name.
    $full_country = ( isset( $this->countries[ $country ] ) ) ? $this->countries[ $country ] : $country;
     
    // Country is not needed if the same as base.
    if ( $country === $this->get_base_country() && ! apply_filters( 'woocommerce_formatted_address_force_country_display', false ) ) {
        $format = str_replace( '{country}', '', $format );
    }
     
    // Handle full state name.
    $full_state = ( $country && $state && isset( $this->states[ $country ][ $state ] ) ) ? $this->states[ $country ][ $state ] : $state;