mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix block cart continuation
This commit is contained in:
parent
6049f8b396
commit
0d8f86eefa
2 changed files with 19 additions and 1 deletions
|
@ -108,7 +108,12 @@ const PayPalComponent = ({
|
|||
shipping_address: shippingAddress,
|
||||
});
|
||||
|
||||
location.href = config.scriptData.redirect;
|
||||
const checkoutUrl = new URL(config.scriptData.redirect);
|
||||
// sometimes some browsers may load some kind of cached version of the page,
|
||||
// so adding a parameter to avoid that
|
||||
checkoutUrl.searchParams.append('ppcp-continuation-redirect', (new Date()).getTime().toString());
|
||||
|
||||
location.href = checkoutUrl.toString();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue