mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 16:24:33 +08:00
Resize and center oxxo modal window
This commit is contained in:
parent
07da639f9d
commit
7985999192
1 changed files with 5 additions and 1 deletions
|
@ -30,10 +30,14 @@ window.addEventListener('load', function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const width = screen.width/2;
|
||||||
|
const height = screen.height/2;
|
||||||
|
const left = (screen.width/2)-(width/2);
|
||||||
|
const top = (screen.height/2)-(height/2);
|
||||||
window.open(
|
window.open(
|
||||||
data.data.payer_action,
|
data.data.payer_action,
|
||||||
'_blank',
|
'_blank',
|
||||||
'popup'
|
'popup, width='+width+', height='+height+', top='+top+', left='+left
|
||||||
);
|
);
|
||||||
|
|
||||||
document.querySelector('#place_order').click()
|
document.querySelector('#place_order').click()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue