Support Forum › Support Forum › GDPR Cookie Compliance › Mailchimp Cookies before acccept Cookie Banner
Hi, Mailchimp loads mailchimp_landing_site cookie before the user accepts cookies.
I found a php code (https://github.com/mailchimp/mc-woocommerce/wiki/Enable-or-Disable-Cookie-Filter) which dont load it but when user accept cookies continuous without being loaded.
What can we do?
Thanks
Moove AgencyHello,
Thanks for using our plugins.
You can try the following code snippet (should be added to the functions.php):
function gdpr_mc_woocommerce_cookie( $cookie_name ) {
$_cookie = true;
if ( function_exists( 'gdpr_cookie_is_accepted' ) ) {
if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) {
$_cookie = true;
} else {
$_cookie = false;
}
}
return $_cookie;
}
add_filter( 'mailchimp_allowed_to_use_cookie', 'gdpr_mc_woocommerce_cookie', 10, 1 );
Hope this helps.
Hi,
Yes it works but when the user accepts the cookies conditions don’t load it.
There is another alternative?
Moove AgencyHello,
Please also add this code to your functions.php:
add_action( 'gdpr_force_reload', '__return_true' );
This will force the page to reload once the user makes any change to the cookies settings.
The previous code snippet should be there as well.
Hope this helps.
The topic ‘Mailchimp Cookies before acccept Cookie Banner’ is closed to new replies.