mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Open payer action in modal window
This commit is contained in:
parent
e1ff5c240b
commit
52c3cc72a8
5 changed files with 79 additions and 7 deletions
15
modules/ppcp-wc-gateway/resources/js/oxxo.js
Normal file
15
modules/ppcp-wc-gateway/resources/js/oxxo.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
window.addEventListener('load', function() {
|
||||
const oxxoButton = document.getElementById('ppcp-oxxo-payer-action');
|
||||
if(oxxoButton) {
|
||||
oxxoButton.addEventListener('click', (event) => {
|
||||
event.preventDefault();
|
||||
window.open(
|
||||
oxxoButton.href,
|
||||
'_blank',
|
||||
'popup'
|
||||
);
|
||||
});
|
||||
|
||||
window.open(oxxoButton.href);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue