mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +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 = {
|
||||
useSubscriptions: false,
|
||||
useCardPayments: false,
|
||||
};
|
||||
|
||||
const { isCasualSeller, areOptionalPaymentMethodsEnabled, products } =
|
||||
|
@ -83,6 +84,10 @@ export const determineProductsAndCaps = ( state ) => {
|
|||
}
|
||||
}
|
||||
|
||||
if ( canUseCardPayments && areOptionalPaymentMethodsEnabled ) {
|
||||
options.useCardPayments = true;
|
||||
}
|
||||
|
||||
if ( canUseVaulting ) {
|
||||
apiModules.push( 'ADVANCED_VAULTING' );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue