Woocommerce cart not working for without login

  • 5 years-11 months

    Woocommerce cart not working for without login

    • Category : wordpress
    • Viewed : 95 times
    • Posted On :
    • Posted by : Vikas

    I am fairly new to woocommerce and although the other day the add to cart and cart page was displaying fine. I am now finding that going to my cart page brings up a blank page.

    add this code in function.php
    add_filter('woocommerce_add_to_cart', 'custome_add_to_cart');
    function custome_add_to_cart() {
        global $woocommerce;
     $woocommerce->session->set_customer_session_cookie(true);
    }
     

Report this or Ask your own question

Your Answer

When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.