Support » Plugin: Complianz | GDPR Cookie Consent » is there a cmplz_all_cookies_accepted function

  • Resolved Volkmar Kantor


    I read your documentation and quite some of the code of your plugin, but i cant find an easy programical-solution to determine if the cookie consent is accepted or not (by php code).

    Is it possible to provide a function like cmplz_is_consent_accepted() with returns a boolean?
    Maybe also a cmplz_is_marketing_consent_accepted()

    Is this possible?

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


    Hi @volkmar-kantor,

    We don’t use PHP for such checks in the plugin, as this won’t work with caching. But it is possible by checking the cookie in PHP, as in the example below:

    What is the use case? In most cases, I would recommend to block / enable cookies using the existing integrations, for example by adding a script to the block list, which will result in the script being activated only after consent. If you can give some more details I can help you with it.

    if (isset($_COOKIE['complianz_consent_status']) && $_COOKIE['complianz_consent_status']==='allow'){

    Hi, thank you for the quick response and the explanation.

    I normaly do not use caching that intense. I have several different pages and on some of them i have quit heavy problems with the placeholders of the google maps integration.

    With Siteorigin Pagebuilder for example the is loaded no matter if i try to block it in scripts or not.

    I also had problems with the maps api on some AVADA pages.

    But I’m fiddling through them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.