If address is required check for state OR postcode to see if an address has been entered yet. Some countries don't have states.
This commit is contained in:
parent
57fe4db23c
commit
35f74206f2
|
@ -1464,7 +1464,7 @@ class WC_Cart {
|
|||
|
||||
if ( get_option( 'woocommerce_shipping_cost_requires_address' ) == 'yes' ) {
|
||||
if ( ! $woocommerce->customer->has_calculated_shipping() ) {
|
||||
if ( ! $woocommerce->customer->get_shipping_country() || ! $woocommerce->customer->get_shipping_state() ) return false;
|
||||
if ( ! $woocommerce->customer->get_shipping_country() || ( ! $woocommerce->customer->get_shipping_state() && ! $woocommerce->customer->get_shipping_postcode() ) ) return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue