Product Visibility by User Role for WooCommerce Pro plugin lets you show/hide WooCommerce products depending on customer’s user role.
Plugin settings are located in “WooCommerce > Settings > Product Visibility”. Also to set user roles for each product, check “Product visibility” meta box on each product’s edit page.
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.
- Make non-purchasable
- This will make selected products non-purchasable (i.e. product can’t be added to the cart).
- Modify query
- This will hide selected products completely (including direct link).
- 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
- 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
- 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.
- Replace description
- This will replace the content in the “Description” tab for the selected products.
- Replace description: Content to replace with
<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:
- 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.
- Product quick edit
- This will add “User Roles” options to the product quick edit screen.
- Products bulk edit
- This will add “User Roles” options to the products bulk edit screen.
Pro version also 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. If you leave any of the options empty – option will be ignored (i.e. all products will be visible).
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”).
Free vs Pro
|Hide product’s catalog visibility
|Make product non-purchasable
|Hide product completely (modify query)
|Set each product’s user roles
|Set each user role’s products (in bulk)
|Set each user role’s product categories (in bulk)
|Set each user role’s product tags (in bulk)
|Redirect a invisible product to a page different from 404
|Hide menu items
|Hide products terms
|Replace product’s description
Prices & Licenses
|Single site||Unlimited sites|
|1 year|| $19.99 / year|| |$49.99 / year
|Lifetime|| $49.99|| $69.99|
We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author
, we are offering 30 day money back guarantee
= 1.4.1 - 19/03/2019 =
* Dev - Plugin author data updated.
= 1.4.0 - 10/02/2019 =
* Dev - General Options - "Replace description" options added.
* Dev - Admin Options - Product quick/bulk edit - "Clear" option added.
* Dev - Bulk Settings - Products - Language codes added to the list.
* Dev - Major code refactoring.
* Dev - Admin settings restyled.
= 1.3.0 - 29/01/2019 =
* Dev - Admin Options - "User roles to display in settings" option added.
* Dev - Admin settings descriptions updated and restyled.
* Fix singular view if category option is in use on bulk settings.
* Fix duplicate tax_query parameters.
* Improve nested tax_query parameters by making it simpler.
* "Redirect URL per product" option added.
* Bulk Settings - "array_merge(): Argument #1 is not an array" PHP warning fixed.
* "Hide menu items" now also hides products items from menu (i.e. not only categories and tags).
* Admin settings restyled.
* Add WPML compatibility to bulk section.
* Code refactored (admin settings).
* Fix products terms hiding regarding multiple roles.
* Fix redirect option forcing invisible products to be 404.
* Make the plugin compatible with WPML plugin.
= 1.2.4 - 25/12/2018 =
* Dev - Bulk Settings - Products - Product ID added to listing.
* Dev - Bulk Settings - Products - WPML - Listing all languages products now.
* Dev - Bulk Settings - Products - Code refactoring - Variations listing optimized.
* Dev - Bulk Settings - Categories / Tags - WPML - Listing all languages terms now.
* Dev - Bulk Settings - Categories / Tags - Term ID and term parent info added.
* Dev - Plugin URI updated.
* Improve 'Bulk Settings' code combined with 'Modify Query' option.
= 1.2.3 - 06/12/2018 =
* Add compatibility with WPML plugin.
= 1.2.2 - 13/08/2018 =
* Improve 'alg_wc_pvbur_can_search' filter preventing the main visibility query to work on wp menu.
* Fix category visibility replacing 'key' by 'taxonomy' on tax_query parameters.
= 1.2.1 - 25/07/2018 =
* Allow other plugins to interact with invisible products query using the 'alg_wc_pvbur_can_search' filter or passing a 'alg_wc_pvbur_search' parameter on customs WP_Query queries.
* Add WooCommerce minimum requirement.
* Improve performance of invisible products search by saving the results of alg_wc_pvbur_get_invisible_products() in cache (Only the ids, not WP_Query).
* Add action 'alg_wc_pvbur_save_metabox' on metabox saving.
* Add new function 'alg_wc_pvbur_get_invisible_products_ids()' to get only the invisible products ids, with a cache option.
= 1.2.0 - 29/06/2018 =
* Improve 'alg_wc_pvbur_is_visible()' function. Get the terms isn't working properly. Replace by wp_get_post_terms().
* Add is_search() check to products hiding function to make sure it works on search results too.
* Add new option to filter product terms hiding product categories and tags using the get_terms() function.
* Improve invisible product detection on single product pages.
* Add new option to hide all products, product categories/tags from user roles.
= 1.1.9 - 24/05/2018 =
* Create "alg_wc_pvbur_get_invisible_products" function.
* Change the way Modify query option works.
* Add 'alg_wc_pvbur_post__not_in' filter.
* Add 'alg_wc_pvbur_hide_products_query' action.
* Update WooCommerce tested up to.
= 1.1.8 - 03/05/2018 =
* Remove pro version checking.
* Fix visible products logic.
* Fix 'alg_wc_pvbur_get_user_roles()' function exists.
* Use composer to handle dependencies.
= 1.1.7 - 18/04/2018 =
* Add composer
* Sync bulk options with post meta values.
* Change the way "product_by_user_role_pre_get_posts()" works. Now it really hides invisible product from queries fixing issues with pagination.
* Add action 'pvbur_save_product' after a product is updated.
* Add a new admin option to hide categories from wp nav menu if there is no products to show.
* Add a filter 'pvbur_hide_empty_cats' to hide categories from wp nav menu if there is no products to show.
= 1.1.6 - 12/04/2018 =
* Add 'alg_wc_pvbur_is_visible' filter.
* Add new option on admin to redirect to a page different from 404 in case a product is invisible.
* Add new filter 'pvbur_invisible_product_redirect' to redirect to a page different from 404 in case a product is invisible.
= 1.1.5 - 26/03/2018 =
* Fix - Core -
is_visible() - Bulk settings - Products - Returning
* Dev - General - Admin Options - "Product quick edit" option added.
* Dev - General - Admin Options - "Products bulk edit" option added.
= 1.1.4 - 12/11/2017 =
* Dev - Core - Possible "
wp_get_current_user() undefined" error fixed.
= 1.1.3 - 31/10/2017 =
* Dev - Admin Settings - Settings tab title updated.
* Dev - Admin Settings - General - Description updated.
= 1.1.2 - 30/10/2017 =
* Dev - Admin Settings - Bulk Settings - User roles subsections added.
* Dev - Admin Settings - Meta box - Title updated.
= 1.1.1 - 26/10/2017 =
* Dev - Admin Settings - Bulk Settings - "Save all changes" button added to each role's section.
* Dev - Admin Settings - Meta box - Title and descriptions updated.
= 1.1.0 - 25/10/2017 =
* Dev - "Bulk Settings" section added.
* Dev - Admin Settings - Meta box select -
chosen_select class added.
* Dev - Admin Settings - Meta box on product edit moved to
* Dev - Code refactoring.
* Dev - Saving settings array as main class property.
= 1.0.0 - 30/08/2017 =
* Initial Release.
- Buy the plugin 🙂
- Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
- Go to Admin Dashboard > Plugins > Add New > Upload Plugin and browse for downloaded zip file.
- If plugin is successfully installed - you should see it added to the Plugins list.
To keep WPCodeFactory items up to date, please install WPCodeFactory Helper plugin and enter your site key.