Support » Plugin: Page Restrict for WooCommerce » “Redirect if user is not logged in” is not working

  • Hello,
    I am using WooCommerece for my website.
    I am trying some pages like “Products” to visible only those users who are logged in to my site.
    I have installed this plugin.
    In Page Restric -> Pages, I select my Products or any page I want to restrict,
    I check “Redirect if user is not logged in” to true,
    under “Page to show if user is not logged in“, I selected “my-account-2” page.
    It still not working. Anyone still can access all those pages.
    But if I use “Lock by Products”, then it works.
    Why?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Vlado Grcic

    (@vladogrcic)

    Thats because it works like that. If there isn’t any product in that section than the restriction is disabled for this page. Another user asked me a related question and after some thinking I might add that feature. Not really sure but I’ll see. But I’m currently working on another feature so it will take a while either way.

    Thread Starter usmanheart

    (@usmanheart)

    I am selling IT products. All products are Virtual/Downloadable.
    Also I need some private pages in which user can See their Private Key and Secrete code to authorize whenever he login that software.
    I think this should be included. Even some pages has no products, but there have some other user related information.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    I’m not really sure about your use case. I’m a bit confused about some aspects. You say your users have a private key and secret code but surely the plugin that handles that would have this feature? Are those keys and codes visible to other users and are they unique to those users? How would just allowing registered users fix this if that’s the case?

    Thread Starter usmanheart

    (@usmanheart)

    Each user when Signup, he will assign his special Appkey, secret key etc.
    That pages should only restricted to him.
    App Key and Secrete keys they can use in APIs.
    When he successfully ordered, product names will be assigned to his Keys page.
    I will use database to load product names and keys for that user.
    Buy Product -> Product name is Stored in database -> Key is generated
    View Product Page -> See Product and Key
    This is how IT products are worked.
    You can check some screenshots
    https://drive.google.com/file/d/1ZdSrN3kWlTkD9pk0kMyb7D4fFZSmpgMg/view?usp=sharing
    https://drive.google.com/file/d/1dVkWogtCSF3EBZZvsYOvXOsbelc90xcg/view?usp=sharing

    • This reply was modified 4 months, 3 weeks ago by usmanheart.
    Plugin Author Vlado Grcic

    (@vladogrcic)

    That’s not really in the scope of this plugin if I understand you correctly. In order for me to do what you are asking I need access to the plugin (or hook, webhook) that generates those codes and get who the user is and restrict it which is not something I’m planning at all. I’m only interested in a login restriction that would deny access to non registered users in general, no one in specific. Maybe I’ll add a hook for this in the future. I’m afraid its a lot of work which I’m unable to do.

    Thread Starter usmanheart

    (@usmanheart)

    Only need to restrict pages. No extra things need to add.
    We have other functions on different pages (done ourselves).
    We just need to restrict some pages to customers/logged-in users only.

    Plugin Author Vlado Grcic

    (@vladogrcic)

    I didn’t suggest I would add anything more than restrict pages. I was explaining what I thought you said about restricting pages to registered users and what I might do. By what you last wrote it seems like you don’t need pages restricted for specific users so that’s fine. I’ll think about it more and see what I’ll do. But again it’ll take a while.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.