• Resolved Martin Blumenfeld

    (@monkeypress)


    Hey, we tried the delete cookies shortcode and it outputs the delete link, but clicking it doesn’t do anything. Is it supposed to delete the cookies listed in the backend? Or do I need to manually code this myself? We do have the reject button disabled if that matters.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @monkeypress,

    The GDPR Cookie Consent plugin creates a cookie named viewed_cookie_policy to record the users’ consent. The [delete_cookies] shortcode is used to delete this cookie set by the plugin.

    Thread Starter Martin Blumenfeld

    (@monkeypress)

    The cookie bar itself works, but clicking the “delete_cookies” link doesn’t do anything. Is it supposed to refresh the page and delete the cookie or something?

    Hi @monkeypress,

    The ‘delete cookies’ link will only delete the cookie named viewed_cookie_policy from the browser. You can see the change reflected from the developer console of your browser after a page refresh.

    Thread Starter Martin Blumenfeld

    (@monkeypress)

    So it actually works? Maybe a nice update would be to show the user that it actually worked. Right now you click the link and nothing happens.

    Hi @monkeypress,

    The delete cookies link does delete the cookie set by the GDPR cookie consent plugin on refreshing the page.
    You may add the following code in line 186 in cookie-law-info/js/cookielawinfo.js to reload the page automatically when clicked on the delete cookies link.

    jQuery("#cookielawinfo-cookie-delete").click(function() {
    Cookie.erase(ACCEPT_COOKIE_NAME);
    location.reload();
    return false;
    });
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Delete Cookies Shortcode Doesn’t Do Anything’ is closed to new replies.