mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Do not add data-user-id-token
if payment method is axo
This commit is contained in:
parent
b6f913d9db
commit
e1271c4087
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import {loadScript} from "@paypal/paypal-js";
|
|||
import widgetBuilder from "../Renderer/WidgetBuilder";
|
||||
import merge from "deepmerge";
|
||||
import {keysToCamelCase} from "./Utils";
|
||||
import {getCurrentPaymentMethod} from "./CheckoutMethodState";
|
||||
|
||||
// This component may be used by multiple modules. This assures that options are shared between all instances.
|
||||
let options = window.ppcpWidgetBuilder = window.ppcpWidgetBuilder || {
|
||||
|
@ -75,7 +76,7 @@ export const loadPaypalScript = (config, onLoaded, onError = null) => {
|
|||
|
||||
// Adds data-user-id-token to script options.
|
||||
const userIdToken = config?.save_payment_methods?.id_token;
|
||||
if(userIdToken && !sdkClientToken) {
|
||||
if(userIdToken && getCurrentPaymentMethod() !== 'ppcp-axo-gateway') {
|
||||
scriptOptions['data-user-id-token'] = userIdToken;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue