mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Handle missing billing address for express block
This commit is contained in:
parent
6a882bb628
commit
b824de4e33
1 changed files with 5 additions and 1 deletions
|
@ -105,7 +105,11 @@ const PayPalComponent = ({
|
|||
useEffect(() => {
|
||||
const unsubscribeProcessing = onPaymentProcessing(() => {
|
||||
const shippingAddress = paypalOrderToWcShippingAddress(paypalOrder);
|
||||
const billingAddress = paypalPayerToWc(paypalOrder.payer);
|
||||
let billingAddress = paypalPayerToWc(paypalOrder.payer);
|
||||
// no billing address, such as if billing address retrieval is not allowed in the merchant account
|
||||
if (!billingAddress.address_line_1) {
|
||||
billingAddress = {...shippingAddress, ...paypalPayerToWc(paypalOrder.payer)};
|
||||
}
|
||||
|
||||
return {
|
||||
type: responseTypes.SUCCESS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue