Home Forums WoodMart support forum 1st account Compare items are still available in browser even with 2 nd account

1st account Compare items are still available in browser even with 2 nd account

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #626892

    kidsdial4
    Participant

    Login with one account , add “compare” button on any product.

    Than logout

    Login with 2nd ACCOUNT, than if you see compare page, than items added by 1st user are still available in 2nd account compare page. please resolve this.

    #626939

    kidsdial4
    Participant

    We logged in to the website

    added some items to compare products list

    we logged out

    than refresh the website

    still we can see “compare ” products exists if we check the compare page

    #627026

    Luke Nielsen
    Keymaster

    Hello,

    Use the code below for help:

    function clear_woodmart_compare_cookie_on_logout() {
        if (isset($_COOKIE['woodmart_compare_list'])) {
         setcookie('woodmart_compare_list', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN);
        }
    }
    add_action('wp_logout', 'clear_woodmart_compare_cookie_on_logout');

    Define it in the functions.php file in your child theme.

    Kind Regards

Viewing 3 posts - 1 through 3 (of 3 total)