Sets Select a country option value as default on shipping-calculator country select input.
This commit is contained in:
parent
eea062f9fa
commit
a75c118c02
|
@ -28,7 +28,7 @@ do_action( 'woocommerce_before_shipping_calculator' ); ?>
|
|||
<?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_country', true ) ) : ?>
|
||||
<p class="form-row form-row-wide" id="calc_shipping_country_field">
|
||||
<select name="calc_shipping_country" id="calc_shipping_country" class="country_to_state country_select" rel="calc_shipping_state">
|
||||
<option value=""><?php esc_html_e( 'Select a country / region…', 'woocommerce' ); ?></option>
|
||||
<option value="default"><?php esc_html_e( 'Select a country / region…', 'woocommerce' ); ?></option>
|
||||
<?php
|
||||
foreach ( WC()->countries->get_shipping_countries() as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '"' . selected( WC()->customer->get_shipping_country(), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';
|
||||
|
|
Loading…
Reference in New Issue