• Resolved margaridamedinacosta

    (@margaridamedinacosta)


    Hello,
    We’re trying to comply with legislation regarding cookie consent. However our screening tool reported that the cookie hustle_module_show_count-popup-2 is being read before the user gives consent. The cookie’s purpose is unclassified. We’ve tried to change the order of the scripts loading but we can’t. Can you please help us?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @margaridamedinacosta !

    I trust you’re doing great!

    Can you try the following snippet?

    add_action('wp_print_scripts', 'wpmudev_hustle_disable_cookie');
    function wpmudev_hustle_disable_cookie(){
    	ob_start();
    	?>
    	if( window.Optin && window.Optin.cookie ){
    		window.Optin.cookie.set = function( name, value, days ){
    			return false;
    		}
    	}
    	<?php
    	$custom_script = ob_get_clean();
    	wp_add_inline_script( 'optin_admin_scripts', $custom_script );
    	wp_add_inline_script( 'hustle_front', $custom_script );
    }

    To install it:
    – copy the code to a .php file
    – upload the .php file to wp-content/mu-plugins directory (please create if it’s not there yet)

    Kind regards,
    Pawel

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @margaridamedinacosta ,

    We haven’t heard from you for a while now, so it looks like you don’t have more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cookie being read before consent’ is closed to new replies.