mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Fix SimulateCart to prevent cart race conditions
This commit is contained in:
parent
e530382a7c
commit
fcfbdbe1fa
1 changed files with 1 additions and 3 deletions
|
@ -159,9 +159,7 @@ class SimulateCartEndpoint extends AbstractCartEndpoint {
|
|||
$this->remove_cart_items();
|
||||
|
||||
// Restore cart and unset cart clone.
|
||||
if ( null !== $this->real_cart ) {
|
||||
WC()->cart = $this->real_cart;
|
||||
}
|
||||
unset( WC()->cart );
|
||||
unset( $this->cart );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue