Merge pull request #14887 from woocommerce/fix/14850
Fixed warning when no customer country is defined.
This commit is contained in:
commit
e005fe0207
|
@ -1981,7 +1981,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
|
|||
|
||||
$field .= '<input type="hidden" class="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="" ' . implode( ' ', $custom_attributes ) . ' placeholder="' . esc_attr( $args['placeholder'] ) . '" />';
|
||||
|
||||
} elseif ( is_array( $states ) ) {
|
||||
} elseif ( ! is_null( $current_cc ) && is_array( $states ) ) {
|
||||
|
||||
$field .= '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="state_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '">
|
||||
<option value="">' . esc_html__( 'Select a state…', 'woocommerce' ) . '</option>';
|
||||
|
|
Loading…
Reference in New Issue