diff --git a/includes/classes/class-cocart-session.php b/includes/classes/class-cocart-session.php index 7539cd7..cc93b04 100644 --- a/includes/classes/class-cocart-session.php +++ b/includes/classes/class-cocart-session.php @@ -252,7 +252,6 @@ public static function load_cart_action() { WC()->session->set( 'coupon_discount_totals', $new_cart['coupon_discount_totals'] ); WC()->session->set( 'coupon_discount_tax_totals', $new_cart['coupon_discount_tax_totals'] ); WC()->session->set( 'removed_cart_contents', $new_cart['removed_cart_contents'] ); - WC()->session->set( 'cart_cached', $new_cart['cart_cached'] ); if ( ! empty( $new_cart['chosen_shipping_methods'] ) ) { WC()->session->set( 'chosen_shipping_methods', $new_cart['chosen_shipping_methods'] ); @@ -262,6 +261,10 @@ public static function load_cart_action() { WC()->session->set( 'cart_fees', $new_cart['cart_fees'] ); } + if ( ! empty( $new_cart['cart_cached'] ) ) { + WC()->session->set( 'cart_cached', $new_cart['cart_cached'] ); + } + // Set loaded cart for guest customer. if ( ! is_user_logged_in() && self::maybe_use_cookie_monster() ) { WC()->session->set_cart_hash();