• Resolved mvbarrios

    (@mvbarrios)


    Hello, i tried to use

    function log_function_cart() {
    global $woocommerce;
    $woocommerce->cart->empty_cart();
    }
    add_action(‘clear_auth_cookie’, ‘log_function_cart’);

    But when user log out the items on the cart still show

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @mvbarrios. This is a code customization, so it is a bit outside most WooCommerce support folks area of expertise, but community members might be able to point you in the right direction here. I also wanted to point you to some other places you could get help with this if you’re not able to get a response here.

    We have a customizations page with resources for contacting a developer for help. You can also ask about this on the WooCommerce Slack Community or WooCommerce FB group which are great places for customization questions like this.

    This thread hasn’t gotten much traction, so I’m going to mark it as resolved. Feel free to start a new thread if you have any further questions!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Clear cart when user log out’ is closed to new replies.