Features
Dokan Conditional Category Attributes — Features
1. Overview
Dokan Conditional Category Attributes is a WordPress plugin for WooCommerce marketplaces using the Dokan multi-vendor framework. It restricts which global product attributes vendors see based on the product category they select.
2. Core Capabilities
2.1 Conditional Attribute Visibility
Administrators define which global attributes are permitted for each product category. When a vendor selects a category during product creation or editing, only the allowed attributes appear in the attribute dropdown. Attributes not relevant to the selected category are hidden.
Example:Â A vendor listing a digital product will not see attributes like “Size” or “Color” if those are not configured for that category.
Custom attributes (vendor-defined, non-global) are always available and unaffected by filtering.
2.2 Hierarchical Category Inheritance
Child categories inherit allowed attributes from parent categories unless they define their own set. The system checks parent categories upward through the taxonomy tree until it finds a configured ancestor.
Parent category defines attributes → all descendants inherit them.
Child category defines its own attributes → child’s set overrides the parent’s.
No configuration found → all global attributes are shown (unrestricted).
This reduces redundant configuration for large category trees while allowing granular control where needed.
2.3 Dokan Native Integration
The plugin integrates directly with Dokan’s vendor dashboard. No vendor training or workflow changes are required.
Loads only on Dokan seller dashboard pages.
Respects Dokan vendor capabilities — no scripts load for users without product edit permissions.
Handles Dokan’s AJAX-powered category selectors and Select2 dropdowns.
Updates attribute options in real time as vendors add, remove, or change categories.
Removes attributes already added to a product if they become disallowed by a category change.
2.4 Frontend Filter Filtering
On WooCommerce category archive pages, layered navigation and attribute filter widgets display only attributes relevant to the current category. Customers see cleaner, contextually appropriate filter options.
Compatible with standard WooCommerce layered nav widgets and most third-party faceted search plugins that use native WooCommerce attribute queries.
2.5 Product Save Validation
When any product is saved — via backend, Dokan frontend, CSV import, or REST API — the plugin validates that only permitted global attributes are retained. Any disallowed attributes are automatically stripped. Custom attributes and all other product data are preserved.
This acts as a server-side safeguard against data integrity violations, even if the JavaScript UI is bypassed.
3. Administrative Interface
3.1 Category Attribute Mapping
Configuration happens inside the standard WordPress product category edit screen:
Go to Products → Categories.
Create or edit a category.
Scroll to the Allowed Attributes section.
Click Configure Allowed Attributes to open the modal.
Search and select attributes from the grid.
Click Apply Selections.
Selected attributes appear as removable chips below the button. Click × on a chip to remove an attribute without reopening the modal.
3.2 Modal Attribute Selector
The attribute selection modal replaces standard checkbox lists with a responsive grid of selectable tiles:
Real-time search filters attributes as you type.
Selected tiles are highlighted with a distinct visual state.
Supports rapid multi-selection before confirming.
Responsive layout: 3 columns on desktop, 2 on tablet, 1 on mobile.
No page reloads — all interaction is client-side for instant responsiveness.
4. License Management
4.1 Activation
Navigate to Authorization Manager in the WordPress admin sidebar.
Enter your authorization token (format: DKN-XXXX-XXXX-XXXX-XXXX).
Click Activate Authorization.
The status badge turns green when active. Until activated, the attribute configuration interface is locked and vendors see the default unfiltered attribute list.
4.2 Tiers
| Tier | Sites | Description |
|---|---|---|
| Single | 1 | Personal use, one website |
| Multi | 2+ | Team access, limited site count |
| Business | Unlimited | Unlimited websites, premium access |
4.3 Management Actions
Sync Now — Refreshes license data from the server.
Deactivate — Releases the license from this domain for use elsewhere.
Replace Authorization — Enter a new token to upgrade tiers or replace an expired license.
4.4 Graceful Degradation
If the licensing server is temporarily unreachable, the plugin continues operating using the last known valid state. Features are not disabled by a single failed connection.
5. Performance
No custom database tables created.
No additional cron jobs or background processes.
Attribute resolution uses indexed WordPress term metadata lookups.
Vendor dashboard JavaScript payload is minimal — typically under 15KB uncompressed for 1,000 categories.
Product save validation hooks into WooCommerce’s existing save cycle without extra database writes.
6. Compatibility
| Component | Supported Versions |
|---|---|
| WordPress | 5.8+ |
| WooCommerce | 5.0+ |
| Dokan Lite / Pro | 3.0+ |
| PHP | 7.4 – 8.3 |
| MySQL / MariaDB | 5.7+ / 10.3+ |
Tested with Storefront, Astra, Flatsome, and WoodMart themes. Does not modify theme templates or inject frontend CSS beyond a single rule for suppressing disabled Select2 options.
7. Roadmap
Planned future enhancements:
Attribute Templates — Save and reuse attribute configurations across multiple categories.
Vendor-Specific Overrides — Allow vendors to request additional attributes, subject to admin approval.
REST API Endpoints — Full CRUD access to category attribute mappings via WooCommerce REST API.
Import/Export Tool — Bulk configuration via CSV and JSON for marketplace migrations.
Analytics Dashboard — Reports on attribute usage and category configuration coverage.