Add block styling settings

This commit is contained in:
Alex P 2023-11-22 17:25:24 +02:00
parent b014403031
commit 2492957dba
No known key found for this signature in database
GPG key ID: 54487A734A204D71
3 changed files with 244 additions and 4 deletions

View file

@ -310,7 +310,7 @@ document.addEventListener(
loadPaypalScript(oldScriptSettings, () => {
const payLaterMessagingLocations = ['product', 'cart', 'checkout', 'shop', 'home', 'general'];
const paypalButtonLocations = ['product', 'cart', 'checkout', 'mini-cart', 'general'];
const paypalButtonLocations = ['product', 'cart', 'checkout', 'mini-cart', 'cart-block', 'checkout-block-express', 'general'];
paypalButtonLocations.forEach((location) => {
const inputNamePrefix = location === 'checkout' ? '#ppcp-button' : '#ppcp-button_' + location;
@ -323,7 +323,7 @@ document.addEventListener(
'layout': inputNamePrefix + '_layout',
}
if (location === 'mini-cart') {
if (document.querySelector(inputNamePrefix + '_height')) {
fields['height'] = inputNamePrefix + '_height';
}