Additional isset checking closes #837.
This commit is contained in:
parent
740ef34492
commit
58679cb50e
|
@ -179,18 +179,24 @@ class WC_Checkout {
|
||||||
$woocommerce->customer->set_postcode( $this->posted['billing_postcode'] );
|
$woocommerce->customer->set_postcode( $this->posted['billing_postcode'] );
|
||||||
|
|
||||||
// Shipping Information
|
// Shipping Information
|
||||||
if (!$skipped_shipping) :
|
if ( ! $skipped_shipping ) :
|
||||||
|
|
||||||
// Update customer location to posted location so we can correctly check available shipping methods
|
// Update customer location to posted location so we can correctly check available shipping methods
|
||||||
|
if ( isset( $this->posted['shipping_country'] ) )
|
||||||
$woocommerce->customer->set_shipping_country( $this->posted['shipping_country'] );
|
$woocommerce->customer->set_shipping_country( $this->posted['shipping_country'] );
|
||||||
|
if ( isset( $this->posted['shipping_state'] ) )
|
||||||
$woocommerce->customer->set_shipping_state( $this->posted['shipping_state'] );
|
$woocommerce->customer->set_shipping_state( $this->posted['shipping_state'] );
|
||||||
|
if ( isset( $this->posted['shipping_postcode'] ) )
|
||||||
$woocommerce->customer->set_shipping_postcode( $this->posted['shipping_postcode'] );
|
$woocommerce->customer->set_shipping_postcode( $this->posted['shipping_postcode'] );
|
||||||
|
|
||||||
else :
|
else :
|
||||||
|
|
||||||
// Update customer location to posted location so we can correctly check available shipping methods
|
// Update customer location to posted location so we can correctly check available shipping methods
|
||||||
|
if ( isset( $this->posted['billing_country'] ) )
|
||||||
$woocommerce->customer->set_shipping_country( $this->posted['billing_country'] );
|
$woocommerce->customer->set_shipping_country( $this->posted['billing_country'] );
|
||||||
|
if ( isset( $this->posted['billing_state'] ) )
|
||||||
$woocommerce->customer->set_shipping_state( $this->posted['billing_state'] );
|
$woocommerce->customer->set_shipping_state( $this->posted['billing_state'] );
|
||||||
|
if ( isset( $this->posted['billing_postcode'] ) )
|
||||||
$woocommerce->customer->set_shipping_postcode( $this->posted['billing_postcode'] );
|
$woocommerce->customer->set_shipping_postcode( $this->posted['billing_postcode'] );
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
|
|
Loading…
Reference in New Issue