Managing Product Visibility by User Role
To manage product visibility by user roles in WooCommerce using the “WooCommerce Product Visibility by User Roles” plugin, follow these steps:
Go to WooCommerce in the left-hand menu of your WordPress admin dashboard. You should now see a new menu item called “Products Visibility.” Click on it to configure the visibility settings.
In the “Visibility By User Roles” section, you’ll find a list of user roles available on your WordPress site. For each user role, follow these steps:
- Enable for this Role: Check this option to enable or disable product visibility for the selected user role.
- Show/Hide: Choose whether you want to show or hide products from users with the selected role.
- Select Products: Select specific products that you want to apply this visibility setting to. If left empty, it will apply to all products.
- Select Categories: Select specific product categories to which this visibility setting should apply. This is optional, and you can leave it empty to apply the rule to all categories.
- Redirection Mode: Choose a redirection mode for restricted items. You have two options:
- Custom URL: Enter a custom URL to which users will be redirected when they try to access restricted products.
- Custom Message: Enter a custom error message that will be displayed when users with the selected role attempt to access restricted products.
After configuring the visibility settings for each user role, make sure to save your changes by clicking the “Save Changes” button on the settings page.