Merge pull request #2379 from Mantish/patch-1
Fix missing state selector(dropdown) for logged-in users. issue #1776
This commit is contained in:
commit
bb181ce632
|
@ -1326,6 +1326,9 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
|
|||
$current_cc = woocommerce_clean( $_POST[ $country_key ] );
|
||||
} elseif ( is_user_logged_in() ) {
|
||||
$current_cc = get_user_meta( get_current_user_id() , $country_key, true );
|
||||
if ( ! $current_cc) {
|
||||
$current_cc = apply_filters('default_checkout_country', ($woocommerce->customer->get_country()) ? $woocommerce->customer->get_country() : $woocommerce->countries->get_base_country());
|
||||
}
|
||||
} elseif ( $country_key == 'billing_country' ) {
|
||||
$current_cc = apply_filters('default_checkout_country', ($woocommerce->customer->get_country()) ? $woocommerce->customer->get_country() : $woocommerce->countries->get_base_country());
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue