42coders / eu-cookie-consent

MIT License
60 stars 17 forks source link

canIUse returns absolutely nothing #2

Closed backyq339 closed 3 years ago

backyq339 commented 3 years ago

Using EuCookieConsent::canIUse('statistics') returns nothing, this is after i've accepted terms.

All i've done is to add statistics in the cookues config, so i could check it before submitting terms.

I have tried canIUse('session') and it works.

My config looks like this:

'cookies' => [ //The key defines the key in the translations and is used to access the Cookie specific information 'session' => [ //Optional: you can set forced to make it impossible for the user to not accept this cookie. 'forced' => 'true', //Optional: The description defines the key in the translations //'description' => 'key in translation File' ], 'xsrf-token' => [ 'forced' => 'true', ], 'statistics' => [],