Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support hannausercentrics

    (@hannausercentrics)

    Hi @krypsin ,
    Thank you for reaching out.

    Possible reason Cookiebot might not block these cookies prior to consent is the use of optimization plugins like WP Rocket or LiteSpeed. These plugins often minify or defer scripts, which can disrupt Cookiebot’s autoblocking functionality. To resolve this issue, you need to exclude Cookiebot scripts from your optimization plugin’s settings.

    If you would also like to request integration for WooCommerce SBJS, please submit a request in the plugin Github Issues section.

    Please don’t hesitate to reach out if you have any further questions or need additional assistance. We’re happy to help!

    Thread Starter codepuncher

    (@krypsin)

    Thanks for sharing the GitHub repo. I’ll submit a PR to the repo for this as a new addon then.

    The documentation explains how to setup a new addon here: https://github.com/CybotAS/CookiebotWP/blob/master/documentation/how-to-block-cookies.md

    During development of this I have noticed that using $this->script_loader_tag->add_tag doesn’t output the data-cookieconsent attribute to the script.

    Looking into that further, it seems that this may be a bug in the core plugin (unless I am misunderstanding this).

    https://github.com/CybotAS/CookiebotWP/blob/6ca854352e6445e3f94c36435fda350467a18431/src/lib/script_loader_tag/Script_Loader_Tag.php#L32-L37

    The wp_script_attributes filter here doesn’t get the cookie type/category from the addon and hardcodes ignore as the type/category.

    This doesn’t happen when using WordPress < 5.7 though and it correctly adds the attribute with correct category.

    Does this makes sense and should this be moved over to a GitHub issue?

    Thanks

    • This reply was modified 10 months, 3 weeks ago by codepuncher.
    Thread Starter codepuncher

    (@krypsin)

    Plugin Support hannausercentrics

    (@hannausercentrics)

    Hi @krypsin
    Thank you for sharing your findings and for the effort you’ve put into addressing this issue. The problem you described with the wp_script_attributes filter and the data-cookieconsent attribute is well-noted, and we’ve created a task for our developers to investigate further.

    We’ll also thoroughly test the code you provided in your pull request to ensure everything works as expected.

    Your dedication and contribution are greatly appreciated. Once the changes have been reviewed and approved, we’ll make sure to keep you updated.
    Thank you again for your valuable input!

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

The topic ‘WooCommerce sbjs / Sourcebuster’ is closed to new replies.