mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ Decouple PayerData from global PPCP object
This commit is contained in:
parent
3e0a44ca1f
commit
15a09d9722
1 changed files with 3 additions and 3 deletions
|
@ -149,12 +149,12 @@ function setCheckoutBillingDetails( payer ) {
|
||||||
|
|
||||||
export function getWooCommerceCustomerDetails() {
|
export function getWooCommerceCustomerDetails() {
|
||||||
// Populated on server-side with details about the current WooCommerce customer.
|
// Populated on server-side with details about the current WooCommerce customer.
|
||||||
return window.PayPalCommerceGateway?.payer;
|
return window?.PayPalCommerceGateway?.payer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSessionBillingDetails() {
|
export function getSessionBillingDetails() {
|
||||||
// Populated by JS via `setSessionBillingDetails()`
|
// Populated by JS via `setSessionBillingDetails()`
|
||||||
return window.PayPalCommerceGateway?.tempPayer;
|
return window._PpcpPayerSessionDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -168,7 +168,7 @@ export function setSessionBillingDetails( details ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.PayPalCommerceGateway.tempPayer = normalizePayerDetails( details );
|
window._PpcpPayerSessionDetails = normalizePayerDetails( details );
|
||||||
}
|
}
|
||||||
|
|
||||||
export function payerData() {
|
export function payerData() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue