mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 04:58:28 +08:00
Merge branch 'trunk' into PCP-2006-google-pay-settings-improvements
This commit is contained in:
commit
ad018766a6
57 changed files with 1367 additions and 2686 deletions
|
@ -4,7 +4,6 @@ import Renderer from '../../../ppcp-button/resources/js/modules/Renderer/Rendere
|
|||
import MessageRenderer from "../../../ppcp-button/resources/js/modules/Renderer/MessageRenderer";
|
||||
import {setVisibleByClass, isVisible} from "../../../ppcp-button/resources/js/modules/Helper/Hiding";
|
||||
import widgetBuilder from "../../../ppcp-button/resources/js/modules/Renderer/WidgetBuilder";
|
||||
import SubElementsHandler from "./SettingsHandler/SubElementsHandler";
|
||||
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
|
@ -309,16 +308,5 @@ document.addEventListener(
|
|||
createButtonPreview(() => getButtonDefaultSettings('#ppcpPayLaterButtonPreview'));
|
||||
});
|
||||
}
|
||||
|
||||
// Generic behaviours, can be moved to common.js once it's on trunk branch.
|
||||
jQuery( '*[data-ppcp-handlers]' ).each( (index, el) => {
|
||||
const handlers = jQuery(el).data('ppcpHandlers');
|
||||
for (const handlerConfig of handlers) {
|
||||
new {
|
||||
SubElementsHandler: SubElementsHandler
|
||||
}[handlerConfig.handler](el, handlerConfig.options)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue