mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Hide "Place order"/show spinner in Pay Now too
This commit is contained in:
parent
d791873033
commit
4fe5a63f42
1 changed files with 2 additions and 2 deletions
|
@ -106,9 +106,9 @@ document.addEventListener(
|
|||
// so we additionally hide the standard order button here to avoid failed orders.
|
||||
// Normally it is hidden later after the script load.
|
||||
const hideOrderButtonIfPpcpGateway = () => {
|
||||
// only in checkout, otherwise it may break things (e.g. payment via product page),
|
||||
// only in checkout and pay now page, otherwise it may break things (e.g. payment via product page),
|
||||
// and also the loading spinner may look weird on other pages
|
||||
if (PayPalCommerceGateway.context !== 'checkout') {
|
||||
if (!['checkout', 'pay-now'].includes(PayPalCommerceGateway.context)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue