Issue adding course to cart

Home Forums Legacy Support Support queries How-to & Troubleshooting Issue adding course to cart

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #235737
    nettechway_448
    Spectator
    Please help. I am having ongoing issue with the "add course to cart" feature. I have cleared all the data at Woocommerce/Tools/Clear transients/Expired transients/Clear customer sessions. And I am still getting the error. https://screencast-o-matic.com/watch/cqleYrUJ6K Please help me get my site functional again.
    #235738
    nettechway_448
    Spectator
    This reply has been marked as private.
    #235808
    logan
    Member
    This reply has been marked as private.
    #235859
    nettechway_448
    Spectator
    Thank you, yes, I've already consulted that link and have done most of it that is within my scope of knowledge. The issue is sometimes it works fine for me, and other times it isn't working at all. I've cleared my cookies numerous times, and have contacted my host to see if it could be a server issue. I'm assuming the issue is happening for students too because my enrollments have dropped significantly.
    #235860
    nettechway_448
    Spectator
    I have also tried on another browser and still getting the same issue....  https://prnt.sc/q696eo
    #235952
    logan
    Member
    this is related to woocommerce, its native function is not working.

    please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :

    add_action( 'woocommerce_init', 'force_non_logged_user_wc_session' );
    function force_non_logged_user_wc_session(){
    if( is_user_logged_in() || is_admin() )
    return;

    if ( ! WC()->session->has_session() )
    WC()->session->set_customer_session_cookie( true );
    }

    #236078
    nettechway_448
    Spectator
    This reply has been marked as private.
    #236091
    nettechway_448
    Spectator
    This reply has been marked as private.
    #236128
    MrVibe
    Keymaster
    This is most definitely a caching issue. Although adding above code is not the best way to resolve the issue. I found that people using the code you above has issues and this link has the correct code https://stackoverflow.com/questions/56314047/check-with-wc-session-has-session-only-on-front-end-but-not-on-rest-api    
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Issue adding course to cart’ is closed to new replies.