mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Refactor unsupported currency notice to show only on payment pages and under the PayPal plugin.
This commit is contained in:
parent
402b87face
commit
1b87257fdb
10 changed files with 131 additions and 22 deletions
|
@ -0,0 +1,14 @@
|
|||
|
||||
// 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;
|
Loading…
Add table
Add a link
Reference in a new issue