mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add phone number from Payer to block checkout
This commit is contained in:
parent
758419c980
commit
8bac91c875
1 changed files with 2 additions and 0 deletions
|
@ -81,12 +81,14 @@ export const paypalShippingToWc = ( shipping ) => {
|
|||
export const paypalPayerToWc = ( payer ) => {
|
||||
const firstName = payer?.name?.given_name ?? '';
|
||||
const lastName = payer?.name?.surname ?? '';
|
||||
const phone = payer?.phone?.phone_number?.national_number ?? '';
|
||||
const address = payer.address ? paypalAddressToWc( payer.address ) : {};
|
||||
return {
|
||||
...address,
|
||||
first_name: firstName,
|
||||
last_name: lastName,
|
||||
email: payer.email_address,
|
||||
phone: phone
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue