Change WordPress user roles and capabilities Forums How to or FAQ Allow access to WooCommerce “Wholesale” category only to “wholesale” Role

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8555
    ms1261
    Participant

    Hi!

    I am trying to restrict access to all products in the “Wholesale” category of our WooCommerce.

    I created the user role “Wholesale” with Read access

    I enabled the Module “Activate content view restrictions”

    I set the default settings to:
    View Access: Allow
    For Users: All Visitors (logged in or not)
    Action: Show Access Error Message

    Then in Products >> Categories >> Wholesale
    View Access: Allow View
    For Users: Selected User Roles (wholesale)
    Action: Show Access Error Message

    But when I access the direct link to the product page that is in the Wholesale category as a Not Logged In user, or any user that is NOT in the “wholesale” role, the product page loads like normal, no restricted access.

    What am I missing?

    Thanks!

    #8556
    ms1261
    Participant

    I also added the Content View settings to the individual product in the Wholesale category and it is also still accessible to the public.

    #8557
    Vladimir
    Keymaster

    Hi,

    Try to use access error action “HTTP 404 error” instead. It fully excludes product from the search and listing, while “Show error message” replaces only product full description and does not restrict access to the product meta fields, which contain price, size, color, etc.

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