mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge branch 'master' of github.com:inpsyde/woocommerce-paypal-commerce-gateway
This commit is contained in:
commit
a72922c2a8
2 changed files with 227 additions and 1 deletions
|
@ -72,7 +72,9 @@ class CheckoutPayPalAddressPreset
|
|||
];
|
||||
$payerMap = [
|
||||
'billing_email' => 'emailAddress',
|
||||
'billing_phone' => 'phone',
|
||||
];
|
||||
$payerPhoneMap = [
|
||||
'billing_phone' => 'nationalNumber',
|
||||
];
|
||||
|
||||
if(array_key_exists($fieldId, $addressMap) && $shipping) {
|
||||
|
@ -87,6 +89,10 @@ class CheckoutPayPalAddressPreset
|
|||
return $payer->{$payerMap[$fieldId]}() ?: null;
|
||||
}
|
||||
|
||||
if(array_key_exists($fieldId, $payerPhoneMap) && $payer && $payer->phone() && $payer->phone()->phone()) {
|
||||
return $payer->phone()->phone()->{$payerPhoneMap[$fieldId]}() ?: null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue