Move buttons loading spinner to the buttons container

should be more reliable, and for Pay Now there is no .place-order
This commit is contained in:
Alex P 2022-03-17 15:59:19 +02:00
parent a1d735bc79
commit d791873033
2 changed files with 4 additions and 2 deletions

View file

@ -16,7 +16,7 @@ import {
} from "./modules/Helper/CheckoutMethodState";
import {hide, setVisible} from "./modules/Helper/Hiding";
const buttonsSpinner = new Spinner('.place-order');
const buttonsSpinner = new Spinner('.ppc-button-wrapper');
const bootstrap = () => {
const errorHandler = new ErrorHandler(PayPalCommerceGateway.labels.error.generic);

View file

@ -458,7 +458,9 @@ class SmartButton implements SmartButtonInterface {
return;
}
echo '<div id="ppc-button"></div>';
// The wrapper is needed for the loading spinner,
// otherwise jQuery block() prevents buttons rendering.
echo '<div class="ppc-button-wrapper"><div id="ppc-button"></div></div>';
}
/**