Skip to content
Back to case studies

Custom WooCommerce plugin case study

Controlling catalog visibility without breaking merchandising

A custom WooCommerce plugin designed for stores where catalog visibility depends on who is browsing. One centrally managed access model keeps restrictions consistent across discovery, navigation, direct access and purchasing instead of relying on theme-level hiding.

WooCommerce hooksCustom pluginRole-based accessCatalog filtering

Context

Some WooCommerce stores need to present different parts of the same catalog to different audiences.

Approach

The implementation uses native WordPress and WooCommerce hooks rather than coupling the behavior to a specific theme.

Outcome

The resulting system makes role-based merchandising substantially more predictable.

Technical model

How the system carries the work from one boundary to the next

System operating model

Catalog access model

  1. 01

    Rules

    Catalog rule authoring

    Visibility is configured by role at the category level, including explicit handling for unauthenticated visitors.

    • Role-to-category rules
    • Guest restrictions
    • Access behavior
  2. 02

    Discovery

    Storefront filtering

    Restricted catalog segments are removed from the places where customers would normally discover them.

    • Product archives
    • Category output
    • Term lists
  3. 03

    Access

    Direct-path protection

    Filtering alone is not treated as security. Restricted product and category URLs are checked independently when accessed directly.

    • Product URLs
    • Category URLs
    • Access checks
  4. 04

    Commerce

    Purchase-path enforcement

    The same rules continue into WooCommerce actions so hidden products cannot bypass restrictions through cart-related flows.

    • Add-to-cart validation
    • Cart cleanup
    • Cross-sell filtering

The problem

The context and technical tension behind the work

Context

Catalog visibility is not always the same as product availability

Some WooCommerce stores need to present different parts of the same catalog to different audiences. A product may belong to the store and remain fully manageable in WooCommerce while still being inappropriate for a particular customer role.

Challenge

Hiding a category is easy. Enforcing the rule everywhere is not.

The obvious implementation would be to remove restricted categories from an archive or hide them in a theme template. That solves only the visible part of the problem.

The approach

Technical decisions that kept the work coherent

Decision 01

Administrators define category restrictions against user roles, with unauthenticated visitors treated as an explicit access context rather than an edge case.

Decision 02

At runtime, the same rules are resolved centrally and reused across the different surfaces where catalog content can appear.

Decision 03

That means archive filtering, term output, navigation, direct-access checks and commerce actions are not separate implementations of the business rule.

They are different enforcement points for the same underlying decision.

The solution

Implementation evidence and technical capability

Solution

A role-aware control layer across the WooCommerce catalog

The finished custom plugin introduces a catalog-access layer between WooCommerce content and the visitor. Restricted categories can be excluded from normal product discovery, removed from category and term output and filtered from navigation.

Technical summary

  • Catalog rule authoringVisibility is configured by role at the category level, including explicit handling for unauthenticated visitors.
  • Storefront filteringRestricted catalog segments are removed from the places where customers would normally discover them.
  • Direct-path protectionFiltering alone is not treated as security. Restricted product and category URLs are checked independently when accessed directly.
  • Purchase-path enforcementThe same rules continue into WooCommerce actions so hidden products cannot bypass restrictions through cart-related flows.

Core capabilities

  • Role-based category visibility
  • Explicit guest restrictions
  • Product archive filtering
  • Category and term-list filtering
  • Navigation filtering
  • Direct product access protection
  • Direct category access protection
  • Add-to-cart validation
  • Restricted cart-item cleanup
  • Cross-sell filtering
  • Redirect-based blocked access
  • Custom access messaging
  • Import/export settings
  • Reset workflow
  • Cache-aware rule updates

Outcome

A technical system with a clearer path forward

One access model across the entire storefront

The resulting system makes role-based merchandising substantially more predictable. Catalog restrictions no longer depend on whether a visitor entered through the shop archive, followed a direct URL, used navigation or reached a product through the cart.

Built to fit into agency delivery

Your tools
Your process
Your client
Our team

The agency retains control of the client relationship, commercial scope and presentation while technical implementation, testing, documentation and handoff remain behind the scenes unless direct communication is explicitly requested.

Start with a bounded scope

Need senior technical support that fits behind your agency?

The engagement can start with a bounded technical task, a complete implementation or an existing codebase that needs stronger ownership.