mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Hide wc place order button when applepay payment method is selected
This commit is contained in:
parent
b173ca1f75
commit
e52939200f
2 changed files with 7 additions and 1 deletions
|
@ -181,9 +181,14 @@ class CheckoutBootstap {
|
||||||
const isSeparateButtonGateway = [ PaymentMethods.CARD_BUTTON ].includes(
|
const isSeparateButtonGateway = [ PaymentMethods.CARD_BUTTON ].includes(
|
||||||
currentPaymentMethod
|
currentPaymentMethod
|
||||||
);
|
);
|
||||||
|
const isGooglePayMethod =
|
||||||
|
currentPaymentMethod === PaymentMethods.GOOGLEPAY;
|
||||||
const isSavedCard = isCard && isSavedCardSelected();
|
const isSavedCard = isCard && isSavedCardSelected();
|
||||||
const isNotOurGateway =
|
const isNotOurGateway =
|
||||||
! isPaypal && ! isCard && ! isSeparateButtonGateway;
|
! isPaypal &&
|
||||||
|
! isCard &&
|
||||||
|
! isSeparateButtonGateway &&
|
||||||
|
! isGooglePayMethod;
|
||||||
const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;
|
const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;
|
||||||
const hasVaultedPaypal =
|
const hasVaultedPaypal =
|
||||||
PayPalCommerceGateway.vaulted_paypal_email !== '';
|
PayPalCommerceGateway.vaulted_paypal_email !== '';
|
||||||
|
|
|
@ -3,6 +3,7 @@ export const PaymentMethods = {
|
||||||
CARDS: 'ppcp-credit-card-gateway',
|
CARDS: 'ppcp-credit-card-gateway',
|
||||||
OXXO: 'ppcp-oxxo-gateway',
|
OXXO: 'ppcp-oxxo-gateway',
|
||||||
CARD_BUTTON: 'ppcp-card-button-gateway',
|
CARD_BUTTON: 'ppcp-card-button-gateway',
|
||||||
|
GOOGLEPAY: 'ppcp-googlepay',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ORDER_BUTTON_SELECTOR = '#place_order';
|
export const ORDER_BUTTON_SELECTOR = '#place_order';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue