Select an option vs state
This commit is contained in:
parent
4672a47d67
commit
afe219d854
|
@ -122,6 +122,10 @@ jQuery( function( $ ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( ! placeholder ) {
|
||||
placeholder = wc_country_select_params.i18n_select_state_text;
|
||||
}
|
||||
|
||||
$statebox.closest( 'p.form-row' ).show();
|
||||
|
||||
if ( $statebox.is( 'input' ) ) {
|
||||
|
|
|
@ -2672,7 +2672,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
|
|||
|
||||
} elseif ( ! is_null( $for_country ) && 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'] ) . '">
|
||||
$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'] ? $args['placeholder'] : esc_html__( 'Select an option…', 'woocommerce' ) ) . '">
|
||||
<option value="">' . esc_html__( 'Select an option…', 'woocommerce' ) . '</option>';
|
||||
|
||||
foreach ( $states as $ckey => $cvalue ) {
|
||||
|
|
Loading…
Reference in New Issue