=== Devkitse Category & Brand Search for WooCommerce ===
Contributors: devkitse
Tags: woocommerce, product categories, product brands, search, admin
Requires at least: 6.5
Tested up to: 7.0.2
Requires PHP: 7.4
Stable tag: 0.1.0-beta.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds a local search box to the hierarchical category and brand checklists on the classic WooCommerce product editor.

== Description ==

Devkitse Category & Brand Search for WooCommerce speeds up assigning categories and
brands to products by adding a search box above each hierarchical taxonomy checklist
in the classic WordPress/WooCommerce product editor — most commonly product categories
(`product_cat`) and, when active, WooCommerce's built-in Brands taxonomy
(`product_brand`).

Core features:

* One search box per eligible, enabled taxonomy checklist. Filtering happens locally
  in JavaScript; there is no network request per keystroke.
* Case- and accent-insensitive matching (typing "kaffe" also finds "Kaffé").
* A match keeps its parent terms visible so the hierarchy stays readable. A term that
  is already checked always stays visible, whether or not it matches the search.
* Optional product-count badge and optional visual flag for empty terms.
* Taxonomy discovery is dynamic, not hard-coded: any hierarchical, UI-visible
  taxonomy registered for products is a candidate, configurable from a settings
  screen under WooCommerce.
* A narrowly scoped observer picks up terms added on the fly through WordPress's
  own "Add new" box, without double-processing or re-scanning the whole page.
* No custom AJAX endpoint, no REST route, no frontend footprint, no external
  scripts or services, no telemetry.
* Full no-op when WooCommerce is inactive, on any other admin screen, or when a
  taxonomy's checklist is not the standard WordPress markup this plugin recognizes.

The plugin does not change alphabetical ordering, does not add "recently used"
shortcuts, and does not touch non-hierarchical taxonomies, product attributes, tag
boxes, or third-party metaboxes that replace the standard checklist. See the FAQ.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin folder or ZIP through Plugins > Add New.
3. Activate Devkitse Category & Brand Search for WooCommerce.
4. Open WooCommerce > Category & Brand Search to choose which taxonomies get a
   search box, and whether to show product counts and flag empty terms.
5. Edit any product to see the search box above its category/brand checklist.

== Frequently Asked Questions ==

= Which taxonomies does this work with? =

Any taxonomy that is hierarchical, shown in the admin UI, and attached to the
`product` post type — in practice `product_cat` (Categories) and, when WooCommerce
Brands is active, `product_brand`. The list is detected dynamically each time the
settings screen loads; nothing is hard-coded to those two slugs.

= Does it work with a custom taxonomy metabox from another plugin? =

Only if that metabox still renders the standard WordPress checklist markup
(`post_categories_meta_box()`). The plugin checks for that exact structure before
doing anything, and leaves a taxonomy alone if a compatible checklist is not found.

= Does searching or filtering change what gets saved? =

No. The search box only hides and shows existing rows; it never changes a
checkbox's name, value, or checked state. Saving the product while a filter is
active assigns exactly the same terms as before filtering.

= Does this replace the "Most Used" tab? =

No. That tab is left untouched and out of scope.

= Does this add anything to the frontend? =

No. The plugin has no frontend output. Its assets load only on the classic product
editor screen (`post.php` / `post-new.php` for the `product` post type), and only
when at least one enabled taxonomy is eligible and the current user has permission
to assign its terms. Whether that taxonomy's checklist is actually the compatible
markup this plugin searches is then checked in the browser, not on the server —
PHP has no way to see the rendered page's DOM.

= What does the plugin store? =

A single option, `dcbsw_settings`, holding which taxonomies are enabled and the two
display toggles. No other data is collected or stored.

= What happens when I delete the plugin? =

Deleting the plugin through WordPress runs uninstall.php, which removes only the
`dcbsw_settings` option. Nothing else is touched.

== Changelog ==

= 0.1.0-beta.1 =
* First beta build for testing outside the development environment. No functional
  changes from 0.1.0 — same code, reviewed by Codex across two rounds and manually
  tested on a live WooCommerce install. Known limitation: performance has not yet
  been benchmarked at a large, realistic category count (a filterable
  `dcbsw_term_count_limit`, default 2000, guards the count/empty-flag feature in
  the meantime; search itself is not affected).

= 0.1.0 =
* Internal review version. Not released.
