diff --git a/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php b/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php index 6862cc006..ed58eec06 100644 --- a/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php +++ b/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php @@ -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 ); }