{"id":259229,"date":"2025-11-06T14:05:48","date_gmt":"2025-11-06T14:05:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/riaco-hide-products-by-user-role\/"},"modified":"2026-06-16T12:05:28","modified_gmt":"2026-06-16T12:05:28","slug":"riaco-hide-products-by-user-role","status":"publish","type":"plugin","link":"https:\/\/tzm.wordpress.org\/plugins\/riaco-hide-products-by-user-role\/","author":8872771,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.1","stable_tag":"1.1.1","tested":"7.0","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"RIACO Hide Products by User Role","header_author":"Roberto Iacono","header_description":"Hide WooCommerce products by WordPress user role.","assets_banners_color":"98b7e8","last_updated":"2026-06-16 12:05:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/riaco-hide-products-by-user-role\/","header_author_uri":"https:\/\/riacoplugins.com\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":446,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"prototipo88","date":"2025-11-06 14:05:33"},"1.1.0":{"tag":"1.1.0","author":"prototipo88","date":"2026-06-09 18:14:37"},"1.1.1":{"tag":"1.1.1","author":"prototipo88","date":"2026-06-16 12:05:28"}},"upgrade_notice":{"1.1.1":"<p>Bug fix: per-product hiding now works correctly when no global rules are configured.<\/p>","1.1.0":"<p>Includes REST API bug fixes and significant new features. Update recommended for all users.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3565957,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3565957,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3567851,"resolution":"1544x500","location":"assets","locale":"","width":1546,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3567851,"resolution":"772x250","location":"assets","locale":"","width":773,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3565957,"resolution":"1","location":"assets","locale":"","width":1163,"height":448},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3565957,"resolution":"2","location":"assets","locale":"","width":871,"height":434},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3565957,"resolution":"3","location":"assets","locale":"","width":870,"height":1360},"screenshot-4.gif":{"filename":"screenshot-4.gif","revision":3565957,"resolution":"4","location":"assets","locale":"","width":1364,"height":605},"screenshot-5.gif":{"filename":"screenshot-5.gif","revision":3566417,"resolution":"5","location":"assets","locale":"","width":1204,"height":605},"screenshot-6.gif":{"filename":"screenshot-6.gif","revision":3566417,"resolution":"6","location":"assets","locale":"","width":1220,"height":605}},"screenshots":{"1":"Global rules settings page \u2014 add, prioritize, and duplicate visibility rules.","2":"Product edit screen \u2014 \"Hide by Role\" tab for per-product role control.","3":"Variation visibility \u2014 per-variation role checkboxes inside the variable product editor."}},"plugin_section":[],"plugin_tags":[207505,217147,249594,1925,286],"plugin_category":[45],"plugin_contributors":[238641],"plugin_business_model":[],"class_list":["post-259229","plugin","type-plugin","status-publish","hentry","plugin_tags-hide-products","plugin_tags-product-visibility","plugin_tags-restrict-products","plugin_tags-user-role","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-prototipo88","plugin_committers-prototipo88"],"banners":{"banner":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/banner-772x250.png?rev=3567851","banner_2x":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/banner-1544x500.png?rev=3567851","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/icon-128x128.png?rev=3565957","icon_2x":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/icon-256x256.png?rev=3565957","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/screenshot-1.png?rev=3565957","caption":"Global rules settings page \u2014 add, prioritize, and duplicate visibility rules."},{"src":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/screenshot-2.png?rev=3565957","caption":"Product edit screen \u2014 \"Hide by Role\" tab for per-product role control."},{"src":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/screenshot-3.png?rev=3565957","caption":"Variation visibility \u2014 per-variation role checkboxes inside the variable product editor."},{"src":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/screenshot-4.gif?rev=3565957","caption":""},{"src":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/screenshot-5.gif?rev=3566417","caption":""},{"src":"https:\/\/ps.w.org\/riaco-hide-products-by-user-role\/assets\/screenshot-6.gif?rev=3566417","caption":""}],"raw_content":"<!--section=description-->\n<p><strong>Hide Products by User Role for WooCommerce<\/strong> gives store owners complete control over product visibility based on WordPress user roles \u2014 including guests (unauthenticated visitors). Set global rules from the WooCommerce settings screen, or configure visibility per product and per variation, all without writing a line of code.<\/p>\n\n<p><a href=\"https:\/\/playground.wordpress.net\/?plugin=woocommerce&amp;plugin=riaco-hide-products-by-user-role\">Live demo<\/a><\/p>\n\n<p>Whether you run a B2B wholesale store, a membership site, or simply want to keep certain products away from guests, this plugin enforces visibility at the query level so hidden products never leak through search, archives, the REST API, or direct URL access.<\/p>\n\n<h3>Why store owners choose this plugin<\/h3>\n\n<ul>\n<li><strong>Run B2B and B2C from a single store<\/strong> \u2014 keep wholesale and retail catalogs side by side and show each audience only what they should see<\/li>\n<li><strong>Protect member-only or exclusive products<\/strong> \u2014 restrict visibility to subscribers, members, or any custom role<\/li>\n<li><strong>Increase catalog relevance<\/strong> \u2014 show each user role a curated product set and reduce catalog noise<\/li>\n<li><strong>Block guest browsing<\/strong> \u2014 require an account before any product is visible, turning your shop into a private catalog<\/li>\n<li><strong>Zero performance overhead<\/strong> \u2014 visibility is enforced at the WordPress\/WooCommerce query level, not as post-load filtering<\/li>\n<\/ul>\n\n<h3>Key Features<\/h3>\n\n<p><strong>Global visibility rules (WooCommerce &gt; Settings &gt; Products &gt; Hide by User Roles)<\/strong><\/p>\n\n<ul>\n<li>Hide <strong>all products<\/strong> from a role with a single rule<\/li>\n<li>Hide products by <strong>category<\/strong> or <strong>tag<\/strong> per role<\/li>\n<li>Unlimited rules with drag-and-drop <strong>priority ordering<\/strong><\/li>\n<li><strong>Duplicate<\/strong> existing rules to create variations quickly<\/li>\n<li>Rule-count badge in the WooCommerce settings navigation<\/li>\n<\/ul>\n\n<p><strong>Per-product and per-variation control<\/strong><\/p>\n\n<ul>\n<li>Dedicated <strong>\"Hide by Role\"<\/strong> tab on every WooCommerce product edit screen<\/li>\n<li>Select any combination of roles to hide that individual product from<\/li>\n<li>Full support for <strong>variable products<\/strong>: set visibility separately on each variation<\/li>\n<\/ul>\n\n<p><strong>Complete query coverage \u2014 hidden means truly hidden<\/strong><\/p>\n\n<ul>\n<li>Shop page, category archives, and tag archives<\/li>\n<li>WordPress and WooCommerce <strong>search results<\/strong><\/li>\n<li><strong>FiboSearch<\/strong> (DGWT WooCommerce Ajax Search) compatibility<\/li>\n<li><strong>WooCommerce REST API<\/strong> (with block-editor edit-context exemption so admins can still select products)<\/li>\n<li><strong>Single product page redirect<\/strong> \u2014 guests are sent to the login page; logged-in restricted users are sent to the shop<\/li>\n<li><strong>Block themes<\/strong> \u2014 replaces the \"No products found\" block with a role-aware login or logout prompt<\/li>\n<\/ul>\n\n<p><strong>Developer-friendly extensibility<\/strong><\/p>\n\n<ul>\n<li>20+ filters and actions covering every stage of the visibility pipeline<\/li>\n<li>Inject runtime rules (subscription-based, time-limited) without touching plugin files<\/li>\n<li>Add custom taxonomy targets, override redirect URLs, or map membership levels to roles<\/li>\n<li>HPOS (High Performance Order Storage) compatible<\/li>\n<\/ul>\n\n<h3>Perfect for<\/h3>\n\n<ul>\n<li><strong>Wholesale \/ B2B stores<\/strong> \u2014 hide retail products from registered wholesalers, or hide wholesale products from regular customers<\/li>\n<li><strong>Membership and subscription sites<\/strong> \u2014 restrict premium products to paying members<\/li>\n<li><strong>Private catalogs<\/strong> \u2014 require an account before any product is shown<\/li>\n<li><strong>Tiered product access<\/strong> \u2014 show different product sets to different customer segments<\/li>\n<\/ul>\n\n<!--section=installation-->\n<h4>Automatic installation<\/h4>\n\n<ol>\n<li>In your WordPress admin, go to <strong>Plugins &gt; Add New<\/strong>.<\/li>\n<li>Search for <strong>Hide Products by User Role for WooCommerce<\/strong>.<\/li>\n<li>Click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<h4>Manual installation<\/h4>\n\n<ol>\n<li>Download the plugin ZIP from WordPress.org.<\/li>\n<li>In your WordPress admin, go to <strong>Plugins &gt; Add New &gt; Upload Plugin<\/strong>.<\/li>\n<li>Upload the ZIP file and click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<h4>First-time setup<\/h4>\n\n<p><strong>Step 1 \u2014 Add a global rule<\/strong><\/p>\n\n<ol>\n<li>Go to <strong>WooCommerce &gt; Settings &gt; Products &gt; Hide by User Roles<\/strong>.<\/li>\n<li>Click <strong>Add Rule<\/strong>.<\/li>\n<li>Choose a <strong>User Role<\/strong> (e.g. <em>Guest<\/em>, <em>Subscriber<\/em>, or any custom role).<\/li>\n<li>Choose a <strong>Target<\/strong>: <em>All Products<\/em> to hide everything, <em>Product Category<\/em> to hide a category, or <em>Product Tag<\/em> to hide by tag.<\/li>\n<li>For category or tag targets, select the specific terms in the Terms column.<\/li>\n<li>Use the <strong>arrow buttons<\/strong> to set rule priority. Rules at the top are evaluated first; an <em>All Products<\/em> rule short-circuits all lower rules for that role.<\/li>\n<li>Click <strong>Save changes<\/strong>.<\/li>\n<\/ol>\n\n<p><strong>Step 2 \u2014 Hide an individual product (optional)<\/strong><\/p>\n\n<ol>\n<li>Open any WooCommerce product in the editor.<\/li>\n<li>Click the <strong>Hide by Role<\/strong> tab in the Product Data panel.<\/li>\n<li>Check the roles that should not see this product.<\/li>\n<li>Click <strong>Update<\/strong>.<\/li>\n<\/ol>\n\n<p><strong>Step 3 \u2014 Hide a specific variation (optional)<\/strong><\/p>\n\n<ol>\n<li>Open a variable product and expand the <strong>Variations<\/strong> section.<\/li>\n<li>Each variation has a <strong>Hide by Role<\/strong> section with per-role checkboxes.<\/li>\n<li>Check the roles to hide that variation from, then save.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"can%20i%20hide%20all%20products%20from%20guests%3F\"><h3>Can I hide all products from guests?<\/h3><\/dt>\n<dd><p>Yes. Add a rule, set the role to <em>Guest<\/em> and the target to <em>All Products<\/em>. Unauthenticated visitors will see no products on the shop page, in search results, or on any product page \u2014 direct URL access redirects them to the login page.<\/p><\/dd>\n<dt id=\"will%20hidden%20products%20be%20removed%20from%20search%20results%20too%3F\"><h3>Will hidden products be removed from search results too?<\/h3><\/dt>\n<dd><p>Yes. The plugin filters all WooCommerce product queries, including shop, category and tag archives, search results, and the WooCommerce REST API.<\/p><\/dd>\n<dt id=\"does%20it%20redirect%20users%20who%20access%20a%20hidden%20product%27s%20url%20directly%3F\"><h3>Does it redirect users who access a hidden product's URL directly?<\/h3><\/dt>\n<dd><p>Yes. Guests are redirected to the WordPress login page (with a return URL so they land back on the product after logging in). Logged-in users whose role hides the product are redirected to the shop. You can override the redirect URL with the <code>riaco_hpburfw_redirect_url<\/code> filter.<\/p><\/dd>\n<dt id=\"can%20i%20hide%20individual%20product%20variations%3F\"><h3>Can I hide individual product variations?<\/h3><\/dt>\n<dd><p>Yes. Open a variable product, expand any variation in the <strong>Variations<\/strong> tab, and you will find a <strong>Hide by Role<\/strong> section with per-role checkboxes.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20woocommerce%20hpos%20%28high%20performance%20order%20storage%29%3F\"><h3>Does it work with WooCommerce HPOS (High Performance Order Storage)?<\/h3><\/dt>\n<dd><p>Yes. The plugin declares full compatibility with WooCommerce High Performance Order Storage.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20block%20themes%20and%20the%20woocommerce%20block%20editor%3F\"><h3>Does it work with block themes and the WooCommerce block editor?<\/h3><\/dt>\n<dd><p>Yes. The plugin filters block-based product collection queries and replaces the \"No products found\" block with a relevant login or logout message when a global hide rule is active for the current user's role.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20fibosearch%20%2F%20dgwt%20woocommerce%20ajax%20search%3F\"><h3>Does it work with FiboSearch \/ DGWT WooCommerce Ajax Search?<\/h3><\/dt>\n<dd><p>Yes. Visibility rules are applied automatically to FiboSearch queries.<\/p><\/dd>\n<dt id=\"how%20does%20rule%20priority%20work%3F\"><h3>How does rule priority work?<\/h3><\/dt>\n<dd><p>Rules are evaluated from the top of the list downward. If an <em>All Products<\/em> rule matches the current user's role, evaluation stops immediately \u2014 no lower rules are checked. Move higher-priority rules to the top using the arrow buttons. Rules with equal priority are evaluated in the order they were created.<\/p><\/dd>\n<dt id=\"can%20i%20add%20custom%20targets%20such%20as%20custom%20taxonomies%3F\"><h3>Can I add custom targets such as custom taxonomies?<\/h3><\/dt>\n<dd><p>Yes. Use the <code>riaco_hpburfw_targets<\/code> filter to add any registered taxonomy as a target in the settings page dropdown.<\/p><\/dd>\n<dt id=\"can%20i%20add%20rules%20programmatically%20or%20at%20runtime%3F\"><h3>Can I add rules programmatically or at runtime?<\/h3><\/dt>\n<dd><p>Yes. Use the <code>riaco_hpburfw_visibility_rules<\/code> filter to inject rules at runtime (useful for subscription-based or time-limited rules) without saving them to the database. Use <code>riaco_hpburfw_rule_applies<\/code> to add extra conditions on top of the base role match.<\/p><\/dd>\n<dt id=\"is%20it%20compatible%20with%20membership%20or%20subscription%20plugins%3F\"><h3>Is it compatible with membership or subscription plugins?<\/h3><\/dt>\n<dd><p>The plugin works with any user role that WordPress recognises. If your membership plugin assigns roles, those roles will appear in the settings automatically. Use the <code>riaco_hpburfw_roles<\/code> filter to expose non-role membership levels, and <code>riaco_hpburfw_rule_applies<\/code> to add time-based or subscription-status conditions.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Fixed per-product hiding silently failing without global rules.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added Product Tag as a global rule target alongside Product Category.<\/li>\n<li>Added duplicate rule button in the global rules settings table.<\/li>\n<li>Added Priority column to the rules table and rule-count badge in the WooCommerce settings nav.<\/li>\n<li>Added Settings quick-link in the Plugins list for faster access.<\/li>\n<li>Added admin footer review prompt on the plugin settings screen.<\/li>\n<li>Added inline confirmation dialog on rule removal to prevent accidental deletes.<\/li>\n<li>Added empty-state message when no rules exist yet.<\/li>\n<li>Added 10+ new extensibility filters and actions for developer extension plugins.<\/li>\n<li>Added FiboSearch (DGWT WooCommerce Ajax Search) compatibility.<\/li>\n<li>Added block theme support: replaces the \"No products\" block with a role-aware login or logout message.<\/li>\n<li>Fixed visibility not applied to WooCommerce REST API product queries.<\/li>\n<li>Fixed variation hide rules not respected for authenticated users accessing products via REST API.<\/li>\n<li>Fixed text domain to match plugin slug.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Control WooCommerce product visibility by user role. Hide products, categories, and variations from guests or any role \u2014 no coding required.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/259229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=259229"}],"author":[{"embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/prototipo88"}],"wp:attachment":[{"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=259229"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=259229"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=259229"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=259229"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=259229"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tzm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=259229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}