• Resolved dglassman

    (@dglassman)


    When I add this code to a page:
    echo ‘Cookie policy answer: ‘ . htmlspecialchars($_COOKIE[“viewed_cookie_policy”]);

    I get:
    Cookie policy answer:

    I have clicked accept so and I see the variable there with a value of yes in Developer Tools so why am I unable to read what gets stored in ‘viewed_cookie_policy’? I have tried refreshing the page but nothing.

    I am using Firefox.

    Thanks

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

    (@webtoffee)

    Hi @dglassman,

    If you want to display the user consent state in the front end, you can use the dedicated shortcode given below.
    [user_consent_state]

    Hope this helps.

    Thread Starter dglassman

    (@dglassman)

    Same issue.

    No matter how many times I click accept in Firefox, [user_consent_state] outputs:
    “No consent given. Manage your consent.”

    I tested this on 2 different computers with 2 different Firefox versions. I can also confirm that cookies are set. It’s just that they are unreadable for some reason.

    It works in Chrome though. I get:
    “Consent Accepted. Manage your consent.”

    Plugin Author WebToffee

    (@webtoffee)

    Hi @dglassman,

    Please share us the site URL so that we can have a look.

    Thread Starter dglassman

    (@dglassman)

    Nevermind, I figured it out. I was able to read the cookie with JS in Firefox. For some reason, Firefox and php together don’t like the way the cookies are set.

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

The topic ‘Can’t read ‘viewed_cookie_policy’’ is closed to new replies.