Showing Custom Message Upon Restriction
To show a custom message upon restriction using the “WooCommerce Product Visibility by User Roles” plugin, follow these steps:
In your WordPress admin dashboard, go to WooCommerce in the left-hand menu.
Within the “Products Visibility” section, you can customize the message that will be displayed when a user with restricted access tries to view a product. You can customize and display custom messages for global visibility and specific user roles.
In the “Redirection Mode” section, you will find two options:
- Custom URL: If you choose this option, you can specify a custom URL to which users will be redirected when they attempt to access restricted products. This can be a page explaining the restriction or a different part of your website.
- Custom Message: If you choose this option, you can add a custom error message that will be displayed when a user tries to access restricted products.
Choose the “Custom Message” option. Enter the custom error message you want to display in the provided text box. This message can inform users why they don’t have access to the product or provide other relevant information.
After entering the message, make sure to save your changes.
