mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Simplify message wrapper rendering and add shop, home locations
This commit is contained in:
parent
0062f20c7a
commit
7da5d8d68a
6 changed files with 328 additions and 45 deletions
|
@ -1,7 +1,7 @@
|
|||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
const payLaterMessagingSelectableLocations = ['product', 'cart', 'checkout'];
|
||||
const payLaterMessagingSelectableLocations = ['product', 'cart', 'checkout', 'shop', 'home'];
|
||||
const payLaterMessagingAllLocations = payLaterMessagingSelectableLocations.concat('general');
|
||||
const payLaterMessagingLocationsSelector = '#field-pay_later_messaging_locations';
|
||||
const payLaterMessagingLocationsSelect = payLaterMessagingLocationsSelector + ' select';
|
||||
|
@ -9,7 +9,7 @@ document.addEventListener(
|
|||
|
||||
const smartButtonLocationsSelector = '#field-smart_button_locations';
|
||||
const smartButtonLocationsSelect = smartButtonLocationsSelector + ' select';
|
||||
const smartButtonSelectableLocations = payLaterMessagingSelectableLocations.concat('mini-cart');
|
||||
const smartButtonSelectableLocations = ['product', 'cart', 'checkout', 'mini-cart'];
|
||||
|
||||
const groupToggle = (selector, group) => {
|
||||
const toggleElement = document.querySelector(selector);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue