mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
✨ Implement the “useCardPayments” option
This commit is contained in:
parent
bfa101ac24
commit
f2f9c1ebcd
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,7 @@ export const determineProductsAndCaps = ( state ) => {
|
||||||
*/
|
*/
|
||||||
const options = {
|
const options = {
|
||||||
useSubscriptions: false,
|
useSubscriptions: false,
|
||||||
|
useCardPayments: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { isCasualSeller, areOptionalPaymentMethodsEnabled, products } =
|
const { isCasualSeller, areOptionalPaymentMethodsEnabled, products } =
|
||||||
|
@ -83,6 +84,10 @@ export const determineProductsAndCaps = ( state ) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( canUseCardPayments && areOptionalPaymentMethodsEnabled ) {
|
||||||
|
options.useCardPayments = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ( canUseVaulting ) {
|
if ( canUseVaulting ) {
|
||||||
apiModules.push( 'ADVANCED_VAULTING' );
|
apiModules.push( 'ADVANCED_VAULTING' );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue