mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Reload page inside then
This commit is contained in:
parent
b303804f81
commit
42ce61de5b
2 changed files with 7 additions and 6 deletions
|
@ -73,7 +73,10 @@ const ppcp_onboarding = {
|
|||
|
||||
const onboard_pui = document.querySelector('#ppcp-onboarding-pui');
|
||||
onboard_pui.addEventListener('click', (event) => {
|
||||
event.preventDefault();
|
||||
event.preventDefault();
|
||||
buttons.forEach((element) => {
|
||||
element.removeAttribute('href');
|
||||
});
|
||||
|
||||
fetch(PayPalCommerceGatewayOnboarding.pui_endpoint, {
|
||||
method: 'POST',
|
||||
|
@ -84,10 +87,8 @@ const ppcp_onboarding = {
|
|||
}).then((res)=>{
|
||||
return res.json();
|
||||
}).then((data)=>{
|
||||
console.log(data)
|
||||
location.reload();
|
||||
});
|
||||
|
||||
location.reload();
|
||||
})
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue