mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 04:58:28 +08:00
Add block styling settings
This commit is contained in:
parent
b014403031
commit
2492957dba
3 changed files with 244 additions and 4 deletions
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue