• Resolved thetianbao

    (@thetianbao)


    Hello,

    First of all, this looks like a really smooth and smart plugin.

    I would like to set a custom duration for the cookies necessary and non-necessary. I want to set it to 30 days not to 1 year, like it is default. Where can I change it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @thetianbao,

    Thanks for your feedback. It would be great if you can leave the plugin a review here.

    To alter the duration of plugin cookie, you may please copy below code snippet to your active theme’s fucntions.php

    add_action('wp_footer','cli_set_expire',20);
    function cli_set_expire()
    { 
    	if(class_exists('Cookie_Law_Info_Public')) //first time visit and class exists
    	{
    	?>
    	<script type="text/javascript">
    
    		CLI_ACCEPT_COOKIE_EXPIRE = 30;
    		
    	</script>
    	<?php
    	}
    }
    Thread Starter thetianbao

    (@thetianbao)

    Thanks a lot. will write a review now ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Duration of the cookies’ is closed to new replies.