Category Rules are used to define rules for hiding or showing of categories based on the selected logical rule. Below are the category rule feature.
- Hide or Show WordPress and WooCommerce categories.
- Excludes the products from hidden categories.
- Excludes the products from search.
- Activate or deactivate category rule.
Category rules leverages logical rules, it mean we can use the logical rules for defining category rules. Below are the few real time use case of leveraging the logical rules for category rules.
- Categories by Role: You might be having a common use case of hiding some categories for a specific role in such case define a logical rule using “User Role” criteria and use it in category rule.
- Categories for Home Page: Categories for home can be achieved by defining a logical rule on Home Page and leveraging it in Categories rule
- Hide Categories from Guest User : One more common common use case of hiding some categories from Guest user(Not logged in User) and these categories should be available for logged in user, in such cases define a rule using “User Profile” criteria.
- Categories by Date and Time: There might be situation where you might be interested in showing special categories like “New Year” or “Christmas” or “Year End Sales” discounts category and these category should be available for only few days or months, in such cases define a Logical rule using “Date and Time” criteria.
You can use Date, Time, Day of Week and Month sub criteria to further refine the rule.
- Categories by Geo Location: If you want to hide or append information for request which are coming from a specific geographic location country or continent then define a logical rule using “Geo Location” Criteria.
Using rules engine we can define lot more simple and complex rules
Simple User Cases:
- Categories by User Id.
- Categories by Request URL.
- Categories by Date, Time, Month and Day of the week.
- Categories for Tablet device.
- Categories for Mobile phone.
Complex Use Cases :
Define complex rule using logical “and” “or” and “brackets”
- Categories by User Role and Date and Time
- Categories by User Role and Geo location
- Categories by User Role, Geo location and Date and Time
- Categories by User Role, Geo location, Device and Date and Time
- Categories by User Role, Geo location, Device or Request URL and Date and Time and More …
“It’s the beauty of rules engine by which we can define more and more complex rule without coding.”