woocommerce-paypal-payments/modules/ppcp-wc-gateway/resources/js/common/wrapped-elements.js
Emili Castells Guasch 11105d913b Run eslint autofix
2024-07-12 12:58:34 +02:00

13 lines
382 B
JavaScript

// This function is needed because WordPress moves our custom notices to the global placeholder.
function moveWrappedElements() {
( ( $ ) => {
$( '*[data-ppcp-wrapper]' ).each( function () {
const $wrapper = $( '.' + $( this ).data( 'ppcpWrapper' ) );
if ( $wrapper.length ) {
$wrapper.append( this );
}
} );
} )( jQuery );
}
export default moveWrappedElements;