• Resolved croubik

    (@croubik)


    I am using the woocommerce groups plugin to restrict access to certain pages based on their group. I have an issue where if i access the page while logged out (access should be restricted), it redirects to the restricted access page which is the ideal scenario. But now if i login and try to access the same page, it redirects again even though my login should be in the required group to allow access. It seems the restricted access is being cached. We have also disabled all caching plugins on the site.

    We have temporarily implemented cache busting by using this code as a workaround:

    var allLinks = document.querySelectorAll('.ld-course-list-items a');
    allLinks.forEach((link) => {
        link.href = link.href + '?' + (new Date()).getTime();
    });

    Is there a better way to prevent this from happening, as visiting the same url without the above query string appended still causes the same issue.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin caches redirects even after user login’ is closed to new replies.