Hi,
I added the mailchimp subscriber pop-up in my website. Whenever i “close the popup” or “subscribe” , it will store a cookie on my browser which take 1 year expired! How can I make change of it? My Mailchimp Subscriber pop-up is generated by Mailchimp. I copy the code and paste it into my child theme.
** I follow the post you suggested last 2 days https://premium.wpmudev.org/forums/topic/how-to-remove-mailchimp-pop-up-cookie-with-php
add_action( ‘init’, ‘my_deletecookie’, 9999 );add_action( ‘init’, ‘my_deletecookie’, 9999 );
function my_deletecookie() { if( isset( $_COOKIE[‘MCPopupClosed’] ) ) { setcookie( ‘MCPopupClosed’, ‘yes’, time() + 86400 ); } }
The problem I discover:
-> successfully create a “duplicate cookie”, i don’t know which cookie will effect…
-> Every time when i refresh the “new duplicate cookie” will update the new expire date/time
<hr />