This is the premium version documentation page. Some features shown here may not be available in the free version. Click here to purchase Product Visibility by User Role for WooCommerce.

Contents

Introduction

Product Visibility by User Role for WooCommerce Pro plugin lets you show/hide WooCommerce products depending on customer’s user role.

Settings

Plugin settings are located in “WooCommerce > Settings > Product Visibility”. To set user roles on a per-product basis, there is also a “Product visibility” meta box on each product’s edit page.

General Options

Start by visiting “General” options section in “WooCommerce > Settings > Product Visibility by User Role > General”. Here you can choose how products should be hidden:

Hide catalog visibility
This will hide selected products in shop and search results. However, the product will still be accessible via direct link.
Default: yes
Make non-purchasable
This will make selected products non-purchasable (i.e. product can’t be added to the cart).
Default: yes
Modify query
This will hide selected products completely (including direct link).
Default: yes
Hide menu items
Hides nav menu items (i.e. hidden products, product categories and tags). Only products, product categories/tags marked in bulk settings will be hidden. This options uses the wp_get_nav_menu_items filter.
Default: no
Hide products terms
Hides products categories and tags from being displayed on front-end. Only categories/tags marked in bulk settings will be hidden. This options works filtering terms from get_terms() function.
Default: no
Redirect
This option is useful only if Modify query is enabled. Redirects to a page different from 404, in case a product is considered invisible.
Default: None
Redirect: Redirect URL per product
This will add new “Product visibility: Redirect URL” meta box to each product’s edit page.
Default: no
Replace description
This will replace the content in the “Description” tab for the selected products.
Default: no
Replace description: Content to replace with
E.g.: <strong><a target="_blank" href="/wp-login.php">Log in</a> to see the product description.</strong>
Default: None
Replace short description
This will replace the content in the “Product Short Description” tab for the selected products.
Default: no
Replace short description: Content to replace with
E.g.: <strong><a target="_blank" href="/wp-login.php">Log in</a> to see the product description.</strong>
Default: None

Per Product Options

After settings general option you can you can set included or excluded user roles for each product individually – go to product’s edit page and locate “Product visibility” meta box:

Why can’t I use both “Visible” and “Invisible” at the same time?

Because you don’t need to — they are mutually-exclusive. “Invisible” means to take something and make it hidden, while all the rest remain visible. However the “Visible” setting works the opposite way — it means to take something and make ONLY what’s entered visible, while all the rest become hidden.

In the screenshot above, we’ve set a product to be shown ONLY to the user roles Customer, Shop manager, Exempt Customer, and Vendor. Any other user roles we didn’t enter (like Guest, Subscriber, etc.) will be hidden. We don’t need to enter them separately.

You can accomplish the same result with either setting, but depending on your situation one may simply be easier than the other. For example, if you only have 1 or 2 you want to be hidden, it’s easy to use the “Invisible” setting. If you have more to be hidden than shown, it might be easier to use the “Visible” setting. It’s up to you to choose which way you prefer.

Admin Options

User roles to display in settings
Leave blank to show all available user roles.
Default: None
Admin products list column
This will add “User Roles” column to the admin products list.
Default: no
Product quick edit
This will add “User Roles” options to the product quick edit screen.
Default: no
Products bulk edit
This will add “User Roles” options to the products bulk edit screen.
Default: no

Bulk Options

The premium version allows you to set user roles visibility options in bulk — for multiple products at once, product categories or product tags. In “WooCommerce > Settings > Product Visibility by User Role > Bulk Settings” you can set which products, product categories or tags are visible or invisible to certain role. If you fill in “Visible” option, then users with selected role will be able to see only chosen products. If you fill in “Invisible” option, then chosen products will be hidden for users with that role.

Why can’t I use both “Visible” and “Invisible” at the same time?

Because you don’t need to — they are mutually-exclusive. “Invisible” means to take something and make it hidden, while all the rest remain visible. However the “Visible” setting works the opposite way — it means to take something and make ONLY what’s entered visible, while all the rest become hidden.

You can accomplish the same result with either setting, but depending on your situation one may simply be easier than the other. For example, if you only have 1 or 2 you want to be hidden, it’s easy to use the “Invisible” setting. If you have more to be hidden than shown, it might be easier to use the “Visible” setting. It’s up to you to choose which way you prefer.

Frequently Asked Questions

Q. I have a pagination issue: the number of products on each page turns out random depending on which products are hidden. What should I do?

A. You need to enable “Modify query” checkbox in plugin “General” settings section (in “WooCommerce > Settings > Product Visibility”).