WC_Cart_Session::destroy_cart_session()
Destroy cart session data.
Method of the class: WC_Cart_Session{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Cart_Session = new WC_Cart_Session(); $WC_Cart_Session->destroy_cart_session();
Changelog
Since 3.2.0 | Introduced. |
WC_Cart_Session::destroy_cart_session() WC Cart Session::destroy cart session code WC 9.2.3
public function destroy_cart_session() { WC()->session->set( 'cart', null ); WC()->session->set( 'cart_totals', null ); WC()->session->set( 'applied_coupons', null ); WC()->session->set( 'coupon_discount_totals', null ); WC()->session->set( 'coupon_discount_tax_totals', null ); WC()->session->set( 'removed_cart_contents', null ); WC()->session->set( 'order_awaiting_payment', null ); }