• Resolved efquintana

    (@efquintana)


    Hi, I hope that you can help me.

    You see, on my website I use shortcodes to show AdSense or something else, according to cookies. I’m using the gdpr_cookie_is_accepted (‘advanced’) function for that.

    While it’s not accepted, something else. When accepted, AdSense.

    The problem is that when it’s accepted, after recharging (I added add_action( ‘gdpr_force_reload’, ‘__return_true’); ), the shortcodes continue to show something else. They only change when going to another page.

    How can I do so that the code of the shortcodes is also collected the same as the rest of the page?

    I thought it was a cache problem and tried to add the gdpr_force_reload hook to the list of hooks that trigger a purge, but it didn’t work either. Maybe it is necessary to add someone else?

    I hope you can give me some idea. Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    HI @efquintana,

    Thanks for using our plugins.
    The force-reload is working on your site, this could be a caching issue. You can try to add the following code to your functions.php

    add_filter('gdpr_cookie_script_cache','gdpr_prevent_script_cache');
    function gdpr_prevent_script_cache() {
      return array();
    }

    Hope this helps.

    Thread Starter efquintana

    (@efquintana)

    Thanks for your answer

    I tried that code too, but it’s still the same problem.

    The code is added now and there is no change.

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @efquintana,

    It seems a server caching problem to me. We can’t purge the server cache by our plugin, so the only solution is if you align your shortcode to show both layouts, with additional class names. And once the third party cookies are accepted, you just change the classes by JavaScript.

    Hope this helps.

    Thread Starter efquintana

    (@efquintana)

    Hi.
    Last night, by chance, I discovered that this behavior only occurs in incognito windows. In the “regular” browser appears to work correctly with the solution you proposed.
    Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Force Reload & Shortcodes’ is closed to new replies.