Sets Select a country option element value attribute to default.
This commit is contained in:
parent
eea062f9fa
commit
9faee1d909
|
@ -2703,7 +2703,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$field = '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="country_to_state country_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . '><option value="">' . esc_html__( 'Select a country / region…', 'woocommerce' ) . '</option>';
|
$field = '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="country_to_state country_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . '><option value="default">' . esc_html__( 'Select a country / region…', 'woocommerce' ) . '</option>';
|
||||||
|
|
||||||
foreach ( $countries as $ckey => $cvalue ) {
|
foreach ( $countries as $ckey => $cvalue ) {
|
||||||
$field .= '<option value="' . esc_attr( $ckey ) . '" ' . selected( $value, $ckey, false ) . '>' . $cvalue . '</option>';
|
$field .= '<option value="' . esc_attr( $ckey ) . '" ' . selected( $value, $ckey, false ) . '>' . $cvalue . '</option>';
|
||||||
|
|
Loading…
Reference in New Issue