title: WooCommerce cart page returns empty if user is not logged in
body: <p>I am in a serious problem about the cart page. I can do everything when I am logged in. But if I am not logged in , I can add products to cart , success message is there BUT the cart returns empty.</p>
  
  <p>I tried a few solutions. What I have done so far is: </p>
  
  <pre><code>// Hook after add to cart Added by Atiqur
  add_action( 'woocommerce_add_to_cart' , 'repair_woocommerce_2_2_8_session_add_to_cart');
  
  function repair_woocommerce_2_2_8_session_add_to_cart( ){
      if ( defined( 'DOING_AJAX' ) ) {
          wc_setcookie( 'woocommerce_items_in_cart', 1 );
          wc_setcookie( 'woocommerce_cart_hash', md5( json_encode( WC()-&gt;cart-&gt;get_cart() ) ) );
          do_action( 'woocommerce_set_cart_cookies', true );
      }
  }
  </code></pre>
  
  <p>Your help is appreciated. Thanks</p>