Block Checkout: Fix the Express Checkout PayPal buttons on the front end

This commit is contained in:
Daniel Dudzic 2024-03-29 18:06:00 +01:00
parent 40e8aa2874
commit 6139f071e5
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -609,6 +609,7 @@ if (block_enabled) {
ariaLabel: config.title,
canMakePayment: async () => {
if (!paypalScriptPromise) {
config.scriptData.url_params.components = 'buttons';
paypalScriptPromise = loadPaypalScriptPromise(config.scriptData);
paypalScriptPromise.then(() => {
const messagesBootstrap = new BlockCheckoutMessagesBootstrap(config.scriptData);