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.
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.
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;
});