WooCommerce, Add to cart not working, and cart page not displaying

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.

Does anyone know what can cause this type of issue?

Related posts

Leave a Reply

2 comments

  1. How about your cart page url?
    Did you alredy set the permalink in wordpress?

    Settings > Permalink Settings > Post name

    it’s automatic to show /%postname%/

  2. add this code into your function.php:

    add_filter('auth_cookie_expiration', 'my_expiration_filter', 99, 3);
    function my_expiration_filter($seconds, $user_id, $remember){
    //if "remember me" is checked;
    if ( $remember ) {
        //WP defaults to 2 weeks;
        $expiration = 14*24*60*60; //UPDATE HERE;
    } else {
        //WP defaults to 48 hrs/2 days;
        $expiration = 2*24*60*60; //UPDATE HERE;
    }
    
    //http://en.wikipedia.org/wiki/Year_2038_problem
    if ( PHP_INT_MAX - time() < $expiration ) {
        //Fix to a little bit earlier!
        $expiration =  PHP_INT_MAX - time() - 5;
    }
    
    return $expiration;
    

    }