• Resolved yaseico

    (@yaseico)


    Hi, I am using an affiliate plugin for woo-commerce ( YITH WooCommerce Affiliates) which sets a cookie when a visitor arrives at the site.

    If the visitor is arriving for the first time then I need to be able to check if they have accepted cookies before the cookie is written by the other plugin.

    I tried to search for the information about your plugin but could not find the information I think I need.

    I have a code sample on how to do that with the affiliate plugin but I don’t know what hook to use that allows me to check if the cookies have been accepted by your plugin.

    So I would like to use code in my functions.php file something like:

    if ( function_exists( ‘surbma-cookies-have-been-accepted’ ) && ! surbma_cookies_accepted() ) return false;

    This approach would be used for any plugin that write cookies of course.

    Hope that makes sense. Could you let me know how I can check if surbma cookies have been accepted?

    Thanks
    Tim

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Surbma

    (@surbma)

    Hi,

    this should work inversely. There is no reason for other plugin developers to implement cookie compatibility with cookie consent plugins, as there are a lot of solutions.

    But indeed, you can make your own integration. My plugin is checking the cookie consent with JavaScript. This method is a cache proof method, hence it is doing so.

    I can not support you with this kind of job, so you need to find a developer.

    But my next big update will give you options to add any custom scripts, that will be blocked until cookie categories are accepted by the visitor. If this is something, you want, it will be added to the plugin.

    Thread Starter yaseico

    (@yaseico)

    Hi @surbma,

    thanks for your reply. The next update you mention sounds like it is something I could definitely use yes. I appreciate that you can’t support integration jobs.

    But can I just check to make sure I understand your reply so that I can discuss with a developer. If I wanted to integrate with your cookie plugin with custom code, then what hook would we use that allowed us to determine when a user clicked “ok” in your cookie plugin? Or are you suggesting there is no hook available and we should use another method?

    Thanks

    Tim

    Plugin Author Surbma

    (@surbma)

    There is no need for any hooks, as cookies are saved in the browser, which can be read by JS. A developer will understand this.

    Thread Starter yaseico

    (@yaseico)

    ok thanks, now I understand. I appreciate your help and feedback. I like your plugin a lot compared to the many others available so look forward to your updates.

    Thanks

    Tim

    Plugin Author Surbma

    (@surbma)

    Thank you! It is good to know, you like it. 🙂

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

The topic ‘Checking if cookies accepted’ is closed to new replies.