mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Redirect to order received
This commit is contained in:
parent
1d729e3572
commit
db3a65ddef
1 changed files with 5 additions and 1 deletions
|
@ -20,7 +20,11 @@ const onApprove = (context, errorHandler) => {
|
|||
errorHandler.genericError();
|
||||
});
|
||||
}
|
||||
location.href = context.config.redirect;
|
||||
|
||||
let orderReceivedUrl = data.data?.order_received_url
|
||||
|
||||
location.href = orderReceivedUrl ? orderReceivedUrl : context.config.redirect;
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue