mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add save payment method attributes to PayPal payment source
This commit is contained in:
parent
08280fa138
commit
99d05ca44d
6 changed files with 81 additions and 17 deletions
|
@ -48,7 +48,13 @@ export const loadPaypalScript = (config, onLoaded) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Load PayPal script
|
||||
// Adds data-user-id-token to script options.
|
||||
const userIdToken = config.save_payment_methods.id_token;
|
||||
if(userIdToken) {
|
||||
scriptOptions['data-user-id-token'] = userIdToken;
|
||||
}
|
||||
|
||||
// Load PayPal script.
|
||||
loadScript(scriptOptions).then(callback);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue