mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
14 lines
416 B
JavaScript
14 lines
416 B
JavaScript
|
|
// This function is needed because WordPress moves our custom notices to the global placeholder.
|
|
function moveWrappedElements() {
|
|
(($) => {
|
|
$('*[data-ppcp-wrapper]').each(function() {
|
|
let $wrapper = $('.' + $(this).data('ppcpWrapper'));
|
|
if ($wrapper.length) {
|
|
$wrapper.append(this);
|
|
}
|
|
});
|
|
})(jQuery)
|
|
}
|
|
|
|
export default moveWrappedElements;
|