• Hello,

    This simple function (in a plugin) does not work when Breeze is enabled,

    function set_referrer_cookie() {
        setcookie("referrer_id", $_GET['ref'], time()+3600, "/");
    }
    
    add_action('init', 'set_referrer_cookie');
    

    For example when opening https://example.com/?ref=123456
    The cookie is set for the first person, but others get the static HTML and Cookie is not set!

    Is there a way around this? maybe I should use something other than (‘init’) hook to run the function?

Viewing 1 replies (of 1 total)
  • Plugin Author adeelkhan

    (@adeelkhan)

    Breeze sets the cookie whenever a blog is updated or a new comment is published. The issue you are facing could occur because of the conflict between the default setting and your custom function. In order to understand the issue, can you describe the use case for which you need to modify/replace the default cookie setting behavior?

Viewing 1 replies (of 1 total)

The topic ‘Breeze and set_cookie()’ is closed to new replies.