{"id":168513,"date":"2023-01-16T19:51:14","date_gmt":"2023-01-16T19:51:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/hide-category-by-user-role-for-woocommerce\/"},"modified":"2026-04-03T16:52:15","modified_gmt":"2026-04-03T16:52:15","slug":"hide-category-by-user-role-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/ar.wordpress.org\/plugins\/hide-category-by-user-role-for-woocommerce\/","author":15704969,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.4","stable_tag":"2.4","tested":"6.8.5","requires":"6.5","requires_php":"8.2","requires_plugins":null,"header_name":"Hide Category by User Role for WooCommerce","header_author":"ThemeSupport","header_description":"This plugin allows you to easily hide WooCommerce categories based on User Role.","assets_banners_color":"095555","last_updated":"2026-04-03 16:52:15","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/themesupport.com\/","header_author_uri":"https:\/\/themesupport.com","rating":4.3,"author_block_rating":0,"active_installs":300,"downloads":5459,"num_ratings":6,"support_threads":2,"support_threads_resolved":1,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.2":{"tag":"1.2","author":"themesupport","date":"2024-04-30 15:13:02"},"1.3":{"tag":"1.3","author":"themesupport","date":"2023-04-14 14:43:49"},"1.4":{"tag":"1.4","author":"themesupport","date":"2023-04-14 15:10:15"},"1.4.1":{"tag":"1.4.1","author":"themesupport","date":"2023-04-24 20:34:14"},"2.0.0":{"tag":"2.0.0","author":"themesupport","date":"2024-04-30 15:17:01"},"2.0.1":{"tag":"2.0.1","author":"themesupport","date":"2024-04-30 15:17:01"},"2.0.2":{"tag":"2.0.2","author":"themesupport","date":"2024-04-30 15:17:01"},"2.1.0":{"tag":"2.1.0","author":"themesupport","date":"2025-01-21 14:30:09"},"2.1.1":{"tag":"2.1.1","author":"themesupport","date":"2025-01-21 14:30:09"},"2.2":{"tag":"2.2","author":"themesupport","date":"2025-01-21 14:30:09"},"2.2.1":{"tag":"2.2.1","author":"themesupport","date":"2025-01-21 14:30:55"},"2.2.2":{"tag":"2.2.2","author":"themesupport","date":"2025-05-20 17:57:06"},"2.3":{"tag":"2.3","author":"themesupport","date":"2025-06-26 16:12:37"},"2.3.1":{"tag":"2.3.1","author":"themesupport","date":"2025-07-17 15:29:36"},"2.3.2":{"tag":"2.3.2","author":"themesupport","date":"2025-11-25 18:30:20"},"2.4":{"tag":"2.4","author":"themesupport","date":"2026-04-03 16:52:15"}},"upgrade_notice":[],"ratings":{"1":1,"2":0,"3":0,"4":0,"5":5},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2849407,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2849407,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":2849407,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2849407,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2849407,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2","1.3","1.4","1.4.1","2.0.0","2.0.1","2.0.2","2.1.0","2.1.1","2.2","2.2.1","2.2.2","2.3","2.3.1","2.3.2","2.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3101306,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3101306,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3101306,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3101306,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3101306,"resolution":"5","location":"assets","locale":""}},"screenshots":{"1":"Hide By category","2":"Hide By user role","3":"Display a custom message when a user attempts to access a hidden category or its related products.","4":"Customize the message to match the look and feel of your site.","5":"Import and Export your settings."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[89,1244,702,1925,286],"plugin_category":[45],"plugin_contributors":[217241],"plugin_business_model":[],"class_list":["post-168513","plugin","type-plugin","status-publish","hentry","plugin_tags-category","plugin_tags-hide","plugin_tags-products","plugin_tags-user-role","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-themesupport","plugin_committers-themesupport"],"banners":{"banner":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/banner-772x250.png?rev=2849407","banner_2x":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/banner-1544x500.png?rev=2849407","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/icon.svg?rev=2849407","icon":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/icon.svg?rev=2849407","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/screenshot-1.png?rev=3101306","caption":"Hide By category"},{"src":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/screenshot-2.png?rev=3101306","caption":"Hide By user role"},{"src":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/screenshot-3.png?rev=3101306","caption":"Display a custom message when a user attempts to access a hidden category or its related products."},{"src":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/screenshot-4.png?rev=3101306","caption":"Customize the message to match the look and feel of your site."},{"src":"https:\/\/ps.w.org\/hide-category-by-user-role-for-woocommerce\/assets\/screenshot-5.png?rev=3101306","caption":"Import and Export your settings."}],"raw_content":"<!--section=description-->\n<p>This plugin allows you to easily hide WooCommerce categories based on User Role.<\/p>\n\n<p>You can also choose to redirect users to a URL or display a custom message when they attempt to access a hidden category or its related products.<\/p>\n\n<p>This plugin has been tested with the most recognized user role management plugins. However, if you notice any bugs, please <a href=\"https:\/\/wordpress.org\/support\/plugin\/hide-category-by-user-role-for-woocommerce\/\">contact us<\/a>.<\/p>\n\n<!--section=installation-->\n<p>To install this plugin:<\/p>\n\n<ol>\n<li>Install the plugin through the WordPress admin interface, or upload the plugin folder to \/wp-content\/plugins\/ using FTP.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress. On a Multisite you can either network activate it or let users activate it individually.<\/li>\n<li>Go to WordPress Admin &gt; Hide Category by User Role for WooCommerce<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>2.4<\/h4>\n\n<ul>\n<li>Date: Apr 3 2026<\/li>\n<li>Fixed an issue where hidden products could still be accessed directly via URL.<\/li>\n<li>Centralized product visibility checks to ensure consistent behavior across single product pages, add-to-cart validation, and cart item cleanup.<\/li>\n<li>Improved hidden category detection by validating parent category restrictions.<\/li>\n<li>Improved frontend access handling for hidden products, including redirect and custom message modes.<\/li>\n<\/ul>\n\n<h4>2.3.1<\/h4>\n\n<ul>\n<li>Date: July 17 2025<\/li>\n<li>Improved compatibility with managed hosting environments.<\/li>\n<\/ul>\n\n<h4>2.3<\/h4>\n\n<ul>\n<li>Date: June 26 2025<\/li>\n<li>Improved compatibility with WooCommerce's term cache.<\/li>\n<\/ul>\n\n<h4>2.2.2<\/h4>\n\n<ul>\n<li>Date: May 20 2025<\/li>\n<li>Fixed a bug that prevented the plugin from hiding categories correctly.<\/li>\n<li>Confirmed compatibility with WordPress 6.8.1<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Date: Jan 21 2025<\/li>\n<li>Compatibility with Woocommerce 9.6.0 checked<\/li>\n<li>Fixed - Missing translation files added.<\/li>\n<li>Adjusted the permissions of the JSON settings file to allow admin users to download it.<\/li>\n<\/ul>\n\n<h4>2.2<\/h4>\n\n<ul>\n<li>Date: Jan 20 2025<\/li>\n<li>Security improvements to counter possible arbitrary content deletion attacks, enhancing the plugin's overall protection.<\/li>\n<li>Added translations for Spanish, German, French, and Portuguese to make the plugin more accessible to a broader audience.<\/li>\n<li>Improvements to the way custom messages are displayed on the frontend, ensuring a more seamless and user-friendly experience.<\/li>\n<li>Enhanced filters to hide products from restricted categories in cross-sell product blocks.<\/li>\n<\/ul>\n\n<h4>2.1.1<\/h4>\n\n<ul>\n<li>Date: Sep 17 2024<\/li>\n<li>Fixed a CSS line that was overriding the body color in some themes<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Date: Jun 11 2024<\/li>\n<li>Resolved an issue causing infinite redirection when the Redirect URL points to the \/shop page but all categories are hidden for a specific user role.<\/li>\n<li>Enhanced validation of hidden categories. Terms are now consulted by ID or slug if custom walkers return these values instead of the term object.<\/li>\n<li>Implemented the exclude_related_products function to exclude related products belonging to hidden categories from the Related Products WooCommerce block.<\/li>\n<li>Implemented the custom_upsell_ids and custom_cross_sell_ids functions to exclude products belonging to hidden categories from the up-sells and cross-sells WooCommerce blocks.<\/li>\n<li>Dequeued theme stylesheets specifically for the plugin's options page to prevent theme styles from overriding the plugin's look and feel.<\/li>\n<li>Improved the look and feel of the administration page<\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Date: Apr 30 2024<\/li>\n<li>Code Improvements<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Date: Oct 12 2023<\/li>\n<li>Fixed *** Missing Files<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Date: Oct 12 2023<\/li>\n<li>Added Import\/Export feature. You can export a JSON file containing all your settings.<\/li>\n<li>Added a Reset Settings feature. Now you can easily reset your previous configuration with a single click.<\/li>\n<li>Added a Message Wrapper feature. You can now choose the DOM element container for your blocked category or product message.<\/li>\n<li>Added Custom Message Styles feature. You can now include CSS rules to customize the message displayed to the users.<\/li>\n<li>The overall appearance and user experience have been enhanced.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Date: Feb 6 2023<\/li>\n<li>Added support for Dokan. Now you can have products and categories that will only be available to sellers (seller-to-seller).<\/li>\n<li>Added a new feature to remove from cart products that may have been added before hiding their categories on the site. This prevents users from purchasing products that are hidden to them.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Date: Jan 19 2023<\/li>\n<li>Added improvements to the way a user is redirected when visiting a hidden category or product.<\/li>\n<li>Added WordPress methods to bypass browser cache on hidden products and categories.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Date: Jan 17 2023<\/li>\n<li>Fixed some compatibility issues with the bootstrap files loaded by other plugins.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Date: Jan 16 2023<\/li>\n<li>First release of the plugin.<\/li>\n<\/ul>","raw_excerpt":"This plugin allows you to easily hide WooCommerce categories based on User Role.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/168513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=168513"}],"author":[{"embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/themesupport"}],"wp:attachment":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=168513"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=168513"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=168513"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=168513"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=168513"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=168513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}