Dprime Woo Filters v1.10.0 Pro WooCommerce

Three REST endpoints that return rendered WooCommerce shop HTML. Configurable filter groups, category picker, and price range filter. Built for Breakdance.

Installation

  1. Install and activate WooCommerce and Dprime Core.
  2. Download Dprime Woo Filters from your account at my.dprime.au.
  3. Install and activate it. It appears under Dprime > Woo Filters in your admin sidebar.
  4. Configure your filter groups, then call the REST endpoints from your Breakdance page.
Permalinks must not be set to Plain. The REST API requires pretty permalinks. Visit Settings > Permalinks and click Save if the endpoints return 404 after activation.

Endpoints

EndpointURLPurpose
Shop/wp-json/dprime-wc-filters/v1/shopMain shop view using saved page title and subtitle
Search/wp-json/dprime-wc-filters/v1/search?s=querySearch results. Also accepts ?q=query
Category/wp-json/dprime-wc-filters/v1/category?category_slug=slugProducts in a specific category

All three endpoints are public (no authentication required).

Query parameters

All three endpoints accept the same filtering parameters.

ParameterTypeEffect
min_pricenumberMinimum price filter
max_pricenumberMaximum price filter
{taxonomy}[]string[]Filter by terms. Example: product_cat[]=shoes&product_cat[]=hats
orderbystringmenu_order, price, price-desc, date, popularity, rating
pagedintPage number, 1-indexed
per_pageintItems per page. Maximum 48. Default 12.

Response shape

All endpoints return the same JSON structure.

{
  "success":    true,
  "title":      "Shop All Products",
  "subtitle":   "Browse our complete range",
  "sidebar":    "<aside class=\"sidebar\">...</aside>",
  "toolbar":    "<div class=\"shop-toolbar\">...</div>",
  "products":   "<div class=\"product-grid\">...</div>",
  "pagination": "<div class=\"pagination\">...</div>"
}

Insert each of the four HTML strings into the appropriate slot in your page template. The shape is stable across the 1.x series.

Settings tabs

TabWhat you configure
GeneralPage title, subtitle, price range filter toggle, hide empty terms toggle
Filter groupsTick which taxonomies appear, drag to reorder, toggle collapsed-by-default per group
CategoriesAll categories or a hand-picked subset. Top-level-only toggle to hide subcategories.

Developer filters

FilterPurpose
dpwft_filterable_taxonomiesFilter the array of taxonomies available as filter groups. Receives an associative array of slug => label. Add custom taxonomies or remove built-in ones.
dpwft_query_argsFilter the WP_Query args before execution. Receives ( $args, $params, $context ) where context is shop, search, or category.

Override classes

/* Admin */
.dp-wft-list            { /* unordered list on Help tab */ }
.dp-wft-cat-row         { /* single row in the category picker */ }
.dp-wft-cat-row.is-on   { /* selected state on a category row */ }
.dp-wft-cat-name        { /* category label text inside a row */ }
.dp-wft-cat-count       { /* product count badge inside a row */ }
.dp-wft-cat-empty       { /* empty state when no rows match search */ }