Sale!

Product Visibility by User Role for WooCommerce

Rated 5.00 out of 5 based on 1 customer rating
(1 customer review)

Display WooCommerce products by customer's user role.

Clear
Author: Pablo Pacheco SKU: N/A Category: Tags: , Version: 1.2.2; Last updated: 2 weeks ago; Requires WordPress version: 4.4; Tested up to: 4.9

Description

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

General Options

Product Visibility by User Role for WooCommerce - Admin Settings - 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 product still will 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: no
Modify query
This will hide selected products completely (including direct link).
Default: no
Hide menu items
Hides menu items from empty product categories. Only categories/tags marked in bulk settings will be hidden. This option 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 option works filtering terms from get_terms() function.
Default: no
Redirect
This will redirect invisible products to a page different from 404.
Default: None

After that 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:

Product Visibility by User Role for WooCommerce - Admin Settings - Product Meta Box

Admin Options

Product Visibility by User Role for WooCommerce - Admin Settings - Admin Options

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

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).

Product Visibility by User Role for WooCommerce - Admin Settings - Bulk Options

Free vs Pro

Free Version Pro Version
Hide product's catalog visibility yes yes
Make product non-purchasable yes yes
Hide product completely yes yes
Set each product's user roles yes yes
Set each user role's products (in bulk) no yes
Set each user role's product categories no yes
Set each user role's product tags no yes
Redirect a invisible product to a page different from 404 no yes
Hide menu items no yes

Prices & Licenses

Single siteUnlimited sites
1 year$19.99$49.99 $22.99
Lifetime$49.99 $44.99$99.99 $50.99

1 review for Product Visibility by User Role for WooCommerce

  1. Rated 5 out of 5

    dvelopit (verified owner)

    Great plugin works well. really fast support – Author even modified plugin for a new feature request. Highly recommended.

    • Pablo Pacheco

      Thanks!

Add a review

50 thoughts on "Product Visibility by User Role for WooCommerce"

  1. Sang Hyun February 8, 2018 at 6:30 pm #

    Is there any way to redirect user to another link if they can’t access to product ?? Not to 404 NOT FOUND page.

    Reply

    • Pablo Pacheco April 3, 2018 at 12:36 am #

      Hello Sang,

      We just added a new option on admin called “Redirect”.
      It allows you to redirect to a page different from 404, in case a product is considered invisible.

      Instead of this admin option, you can use the filter ‘pvbur_invisible_product_redirect’ instead.
      If you have any questions, let me know.

      See you πŸ˜‰

      Reply

  2. vytautassmociukas March 22, 2018 at 12:22 am #

    is it correct that plugin just hide products but not categories and menu if it associated with the product? any chance for update with this feature?

    Reply

    • Tom Anbinder March 22, 2018 at 6:50 pm #

      Hi Vytautas,

      Did you try enabling “Modify query” checkbox in plugin settings?

      Best regards,
      Tom

      Reply

      • vytautassmociukas March 22, 2018 at 11:39 pm #

        Yes did that.
        Maybe i described situation not in the right way πŸ™‚
        i have role where i need to show just n products and i do that and its works
        but here i have problem that all empty ( where are all products hided) categories are shown as well

        Reply

        • vytautassmociukas March 22, 2018 at 11:39 pm #

          menu also

          Reply

        • Tom Anbinder March 23, 2018 at 11:13 pm #

          Hi Vytautas,

          Could you please let me know if those empty categories and menus are shown in your theme without our “Product Visibility by User Role” plugin. I mean – if our plugin is disabled at all, and you create an empty category – is it still shown or hidden?

          Best regards,
          Tom

          Reply

          • vytautassmociukas March 26, 2018 at 4:23 am #

            one again:) i have 7000 products and if want to show just 3 for particular role i need to use show function. and its working. The issue is then i am showing just 3 products all other categories becoming empty and my costumer can see all these empty categories and menu. in other words πŸ™‚
            i have 7 categories with product on of them milk and if i am showing just milk for one client the other categories are empty but they still appear in categories list and menus.

        • Pablo Pacheco April 2, 2018 at 10:40 pm #

          Hi,

          Can you please send us your site URL?

          Reply

        • Pablo Pacheco April 4, 2018 at 12:27 am #

          Hello again,

          I’m happy to inform we just updated a new version (1.1.7) which allows you to hide empty categories.

          You just have to enable the option called “Hide menu items” on plugin’s settings.

          After that you have to save the menu.

          Please tell me if you liked the solution πŸ˜‰
          See you

          Reply

  3. Patrick April 1, 2018 at 12:49 am #

    Hey.

    I’m using the “Members” plugin to create custom roles. Will the Pro version of this plugin recognize custom roles, or just the WordPress default roles?

    Reply

    • Pablo Pacheco April 1, 2018 at 10:00 pm #

      Hi,

      Yes. It will recognize the default and the custom roles too, including the ones made by the Members plugin

      Reply

  4. Damir April 18, 2018 at 4:49 am #

    Hi,

    Does the plugin work on variable products?
    Can we hide only some variation of same product?

    Also Im wondering how does bulk function work.
    In admin product list table?

    Thanks.

    Reply

    • Pablo Pacheco April 18, 2018 at 5:45 pm #

      Hi Damir,
      For now it won’t work on variable products, but we are working on that πŸ˜‰

      The Bulk settings are located on plugin’s settings, next to General tab.
      It lets you setup just in one place all your products that are invisible/visible for a specific role

      Reply

  5. Stefan.Kroener May 7, 2018 at 11:30 am #

    Hi,

    I installed your plugin – everything works fine. Allmost everything.

    I noticed a strange problem:

    When I enable “Modify query”, I get a 404 error when trying to open the “my account” page; when I disable this option, everything is fine… in addition, the problem does not affect guest-user, but for example customer-users.

    Thanks in advance

    Stefan

    Reply

    • Pablo Pacheco May 7, 2018 at 6:33 pm #

      Hi Stefan,

      Can you please update to the most recent version (1.1.8)?

      Reply

      • Stefan.Kroener May 8, 2018 at 7:53 pm #

        Hi Pablo,

        I have updated to 1.1.8 – now it seems, as if the plugin quit working πŸ™

        I used the plugin for example to hide all products to guests – now, as a guest, you suddenly see all products… perhaps something is wrong with that version?

        Reply

        • Pablo Pacheco May 8, 2018 at 9:12 pm #

          Can you please try one thing?

          Just enter on the admin page of a product that should be invisible and try to simply update it.

          After that, check if the product will be invisible

          Reply

          • Stefan.Kroener May 10, 2018 at 10:19 am #

            I tried what you suggested.

            Unfortunately, this did not change anything.

            I also tried to remove the tag and the re-assign ist, this also did not help πŸ™

          • Stefan.Kroener May 10, 2018 at 10:25 am #

            I have just tried one more thing:

            The Problem only occurs if I am trying to toggle visibilty using tags.

            When I am using the setting “invisible for Guest” on the product edit page, the product gets hidden – so this setting works fine.

        • Pablo Pacheco May 11, 2018 at 6:04 pm #

          Hello,

          I just uploaded a new version. Can you please check it out?
          Actually it’s a backup from version 1.1.7

          Reply

  6. Michael May 8, 2018 at 1:14 pm #

    Hi there
    On my site Weensu.dk I have used your plugin cause I want to show certain products to vendors only (also admin and shop manager) and hide for customers, since they are not β€œreal” products.

    The idea with your plugin is great but I am still seeing the products on shop page if I sort on filter β€œnewly added” or search for the product in search field.

    Is this an error you know of?

    My guess is that the idea is to completely hide the products that have been marked as visible to only certain user roles.

    I have clicked all 3 settings in admin area regarding when and how to hide.

    Cheers
    Michael

    Reply

    • Pablo Pacheco May 8, 2018 at 1:55 pm #

      Hi Michael,

      That shouldn’t be happening. Are you using the most recent version ?
      Can I see your site?

      Reply

  7. Michael May 10, 2018 at 5:58 pm #

    I use version 1.1.8.
    What do you need to see my site?

    Reply

  8. Michael May 10, 2018 at 6:47 pm #

    Sure.
    I have set it up so that Vendors should see the specific products and customers should not. What user role do you want?

    Reply

  9. straycatco May 10, 2018 at 10:07 pm #

    I have added Products bulk edit and it still doesn’t show on the bulk edit screen??

    Also, I set up in the Bulk Edut section that for “Guest” my default category is set to invisiable, but it still shows??

    Reply

    • Pablo Pacheco May 10, 2018 at 10:31 pm #

      Hello,

      I’m fixing some issues on the plugin. It should be available soon.
      I’ll let you know when it’s ready

      Reply

    • Pablo Pacheco May 11, 2018 at 6:03 pm #

      Hello,

      I just uploaded a new version. Can you please check it out?
      Actually it’s a backup from version 1.1.7

      Reply

      • Colleen Dwyer-Bonura June 14, 2018 at 7:54 pm #

        where can I find the 1.1.7 version??

        Reply

        • Pablo Pacheco June 14, 2018 at 7:57 pm #

          He have already fixed all the issues since version 1.2.0.
          Are you still facing some kind of problem?

          Reply

  10. dvelopit May 29, 2018 at 12:31 am #

    Hi there,

    Just purchased Product Visibility by User Role for WooCommerce Pro but get the following error.

    Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home/jmfnzcon/public_html/wp-content/plugins/product-visibility-by-user-role-for-woocommerce-pro/includes/class-alg-wc-pvbur-core.php on line 140

    Running WP 4.9.5.

    Any ideas?

    Reply

    • Pablo Pacheco June 2, 2018 at 2:46 pm #

      Hi,

      I know we have already fixed this for you but just to make it clear for other users, this error have been fixed on version 1.2.0.

      Reply

  11. Sarah Wilson June 11, 2018 at 2:18 pm #

    Hi, just installed the pro plugin.
    I used “visible categories” for a certain profile.
    The problem: unavailable products are white spots on my shop page, they are not really hidden.

    Can you help me out?

    THX!
    Stef

    Reply

    • Pablo Pacheco June 11, 2018 at 7:42 pm #

      Hello,
      Can you please make sure the “Modify query” option is checked?
      Maybe it will solve your issue

      Reply

      • Sarah Wilson June 12, 2018 at 6:06 am #

        OK! Works great now!

        THX
        Stef

        Reply

  12. easycomtech June 11, 2018 at 10:50 pm #

    Hi,

    Does the plugin work on variable products?
    Can we hide only some variation of same product based on a role?
    (For example hide an attribute on subscribers and not login users)

    Thanks.

    Reply

    • gojira68 June 12, 2018 at 8:49 am #

      I have the same question! πŸ™‚

      Reply

      • Pablo Pacheco June 14, 2018 at 8:57 pm #

        Hi,
        Unfortunately that’s not possible for now.
        But we are going to add this on our to-do list, that would be a interesting feature, thanks

        Reply

    • Pablo Pacheco June 14, 2018 at 8:57 pm #

      Hi,
      Unfortunately that’s not possible for now.
      But we are going to add this on our to-do list, that would be a interesting feature, thanks

      Reply

  13. Eva Grouling Snider June 27, 2018 at 6:41 pm #

    Hello – The plugin works great to hide products from users with the Guest user role. However, products are still showing up in Guest searches. No combination of check marks in the settings fixes that problem. Can you please advise?

    Reply

    • Pablo Pacheco June 27, 2018 at 8:34 pm #

      Hello,

      Can you please describe exactly what settings are making your products be displayed in search results?
      Maybe we can try to reproduce it here. Thanks for your question

      Reply

      • Eva Grouling Snider June 27, 2018 at 9:28 pm #

        “Modify query” is checked. “Admin products list column” is checked. “Product quick edit” is checked. I tried on a sample product, and it shows 404 for Guests with a direct link (which is correct). But then, as a Guest, I searched for the product, and it shows up in Search results.

        Reply

        • Pablo Pacheco June 29, 2018 at 6:52 pm #

          Hi again Eva,
          I noticed you were right. I just updated the plugin. Can you please try it and tell me the results?

          Reply

          • Maurice July 5, 2018 at 11:59 am #

            Hi Pablo,

            Ik just downloaden and tested the free version. But i also have the same issue as Eva.

            Product is hidden and is not accessible. But it shows in the search result.

            The version i use is: 1.2.0

  14. Optecit July 5, 2018 at 7:50 pm #

    Evening,

    I have just uploaded and tried to activate your plugin and got the following:

    Fatal error: Cannot redeclare class ComposerAutoloaderInitd91de799bee38406c4de55b741389134 in

    Have i missed something?

    Thanks!

    Reply

    • Pablo Pacheco July 5, 2018 at 7:52 pm #

      Hi,

      Can you please make sure to disable your free version before trying to enable the pro one?

      Reply

    • Optecit July 5, 2018 at 7:53 pm #

      DOn’t worry – I just realised i had the non pro version installed as well and it was causing a conflict!

      Reply

      • Pablo Pacheco July 5, 2018 at 7:55 pm #

        Glad to hear!
        Enjoy it πŸ™‚

        Reply

Leave a Reply

Changelog

= 1.2.2 - 02/07/2018 =
* Fix category visibility replacing 'key' by 'taxonomy' on tax_query parameters

= 1.2.1 - 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

= 1.2.0 - 02/06/2018 =
* Change the way Modify query option works
* 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 - 11/05/2018 =
* Rollback to version 1.1.7

= 1.1.8 - 07/05/2018 =
* Add 'alg_wc_pvbur_is_visible' filter
* Fix 'alg_wc_pvbur_get_user_roles()' function exists
* Fix visible products logic
* Use composer to handle dependencies
* Remove pro version checking from free plugin

= 1.1.7 - 03/04/2018 =
* 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 - 02/04/2018 =
* 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 false only.
* 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 side with low priority.
* Dev - Code refactoring.
* Dev - Saving settings array as main class property.

= 1.0.0 - 30/08/2017 =
* Initial Release.

Installation

  • 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.

Updates

To keep WPCodeFactory items up to date, please install WPCodeFactory Helper plugin and enter your site key.