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:

  1. Go to Products → Categories.

  2. Create or edit a category.

  3. Scroll to the Allowed Attributes section.

  4. Click Configure Allowed Attributes to open the modal.

  5. Search and select attributes from the grid.

  6. Click Apply Selections.

  7. 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

  1. Navigate to Authorization Manager in the WordPress admin sidebar.

  2. Enter your authorization token (format: DKN-XXXX-XXXX-XXXX-XXXX).

  3. Click Activate Authorization.

  4. 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

 
 
TierSitesDescription
Single1Personal use, one website
Multi2+Team access, limited site count
BusinessUnlimitedUnlimited 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

 
 
ComponentSupported Versions
WordPress5.8+
WooCommerce5.0+
Dokan Lite / Pro3.0+
PHP7.4 – 8.3
MySQL / MariaDB5.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.