diff --git a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php index 0360af6db..cc8f938e2 100755 --- a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php +++ b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php @@ -589,6 +589,9 @@ public function store_payment_response( $data ) { * @return array */ public function set_customer_taxable_address( $address ) { + if ( ! WC()->customer ) { + return $address; + } // set to the shipping address provided by Google Pay if: // 1. billing is not available diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php index 4e1610c49..eb33ac319 100755 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php @@ -703,6 +703,9 @@ public function clear_payment_data() { * @return array */ public function set_customer_taxable_address( $address ) { + if ( ! WC()->customer ) { + return $address; + } $billing_country = WC()->customer->get_billing_country();