• Resolved jj04

    (@jj04)


    Hi, so I have a woocommerce store that has a simple PHP script that prevents not logged in users from seeing the price.
    I also have your cache plugin turned on.

    So during testing I’ve noticed that if a visitor goes to the product page (before logging in), sees the products (without prices), then login and come back to the same product page, they will still have the same page that cached before they logged in (so they still can’t see the price).

    I checked settings and i have enabled “Don’t cache pages for logged in users” as well as “Don’t cache pages for following user roles” for customer and subscriber roles. So this implies that after that user logs in, the proper, non cached (from before) page would show up for them.

    Does anyone knows how to resolve it?

    • This topic was modified 1 year, 4 months ago by jj04.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jj04

    Thank you for reaching out and I am happy to help!

    Can you please share where you added the mentioned php script?
    What you can do is try using the Page Fragment Cache, replacing the PHP tags with <mfunc> and therefore excluding this part from being cached.
    You can check more in our FAQ about the Page Fragment Cache.

    Let me know if this helps!

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Previously cached pages show up after login’ is closed to new replies.