Open payer action in modal window

This commit is contained in:
dinamiko 2022-07-12 14:44:08 +02:00
parent e1ff5c240b
commit 52c3cc72a8
5 changed files with 79 additions and 7 deletions

View 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);
}
});