mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ Option to only set missing billing details
This commit is contained in:
parent
63e9c8bf27
commit
c007d7909c
2 changed files with 8 additions and 4 deletions
|
@ -634,8 +634,8 @@ class GooglepayButton extends PaymentButton {
|
|||
|
||||
const propagatePayerDataToForm = () => {
|
||||
const raw = paymentData?.paymentMethodData?.info?.billingAddress;
|
||||
|
||||
const payer = {
|
||||
email_address: paymentData?.email,
|
||||
name: {
|
||||
given_name: raw.name.split( ' ' )[ 0 ], // Assuming first name is the first part
|
||||
surname: raw.name.split( ' ' ).slice( 1 ).join( ' ' ), // Assuming last name is the rest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue