Fixed method retuning value in write context in includes/class-wc-checkout.php
This commit is contained in:
parent
0f801ed701
commit
653f79b25b
|
@ -563,8 +563,9 @@ class WC_Checkout {
|
|||
}
|
||||
|
||||
if ( WC()->cart->needs_shipping() ) {
|
||||
$shipping_country = WC()->customer->get_shipping_country();
|
||||
|
||||
if ( empty( WC()->customer->get_shipping_country() ) ) {
|
||||
if ( empty( $shipping_country ) ) {
|
||||
wc_add_notice( __( 'Please enter an address to continue.', 'woocommerce' ), 'error' );
|
||||
} elseif ( ! in_array( WC()->customer->get_shipping_country(), array_keys( WC()->countries->get_shipping_countries() ) ) ) {
|
||||
wc_add_notice( sprintf( __( 'Unfortunately <strong>we do not ship %s</strong>. Please enter an alternative shipping address.', 'woocommerce' ), WC()->countries->shipping_to_prefix() . ' ' . WC()->customer->get_shipping_country() ), 'error' );
|
||||
|
|
Loading…
Reference in New Issue