
Tagged: disable cookie consent
-
AuthorPosts
-
February 27, 2025 at 3:19 pm #1478137
Hello team,
We’ve opted to use another cookie plugin and want to disable cookie consent messages. When we set the Privacy and Cookies > Enable cookie consent messages(field) to Disable Cookie Consent Messages and press Save all changes… it reverts to Enable Cookie Consent Messages value. Is there a way to disable this via functions.php? This is only happening on 2 of our many Enfold sites. Thanks for your help.February 27, 2025 at 7:31 pm #1478153Hey Julie,
Thanks for the login details. I see that happening on your site, but I cannot reproduce it on a test site. What happens if you activate the parent theme and try then?
Best regards,
RikardFebruary 28, 2025 at 2:53 pm #1478258Hi Rikard,
When switching to disable cookie consent on the Parent theme, it sticks. When swapping back to child theme, and switch to disable cookie consent value it remains for a few clicks (elsewhere on the dashboard), but then switches back to Enabled within a minute. So strange.March 1, 2025 at 11:54 am #1478305Hi,
Thanks for the update. Did you try removing your customisations to see what happens then? We tried checking your site again, but it look down at the moment.
Best regards,
RikardMarch 1, 2025 at 1:07 pm #1478315Hi Rikard,
We are not experiencing an outage. The site is up and Pingdom shows this as well (no alerts) and all scheduled tasks ran smoothly throughout the night. I can try a clean functions.php but there has been zero changes there for over a year. Not sure if that’s what’s happening. Next up would be to deactivate each plugin to check for conflicts. Do you have a list of those documented, that would be helpful.
Last, I’ve initially asked if I can deactivate the setting with a few lines in the functions.php file. Possible?
jMarch 1, 2025 at 5:49 pm #1478343March 1, 2025 at 7:01 pm #1478359This reply has been marked as private.March 3, 2025 at 6:36 am #1478433Hi,
Thank you for the update.
The cookie consent message is still enabled for both sites when checked again today, and the child theme is also enabled. Is this still an issue?
Best regards,
IsmaelMarch 3, 2025 at 9:58 am #1478454Hi Ismael,
Yes. The disable option is not sticking. Press disable, save. Click around the site and when verifying “disabled”, the value has reverted to “enabled”.
Thank you for checking on this!March 4, 2025 at 4:17 am #1478514Hi,
Thank you for the update.
The issue occurs because of this hook in the functions.php file:
add_action("wp", function() { if(is_page(array(29310))) { avia_update_option("cookie_consent", "hide_bar"); } else { avia_update_option("cookie_consent", "cookie_consent"); } }, 999);
This updates the status of cookie consent messages option on every page refresh.
Best regards,
IsmaelMarch 4, 2025 at 2:03 pm #1478582Hi Ismael,
Thanks for the fix – it works. I appreciate the solution and your support.
jMarch 4, 2025 at 8:22 pm #1478606Hi,
Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Disable Cookie Consent Messages doesn’t stick’ is closed to new replies.