wc-product-search-select

Installation
SKILL.md

WooCommerce: AJAX product search select (wooselect / selectWoo)

For UIs where the user picks from products (and optionally variations) — meta boxes, settings pages, dashboard widgets. The mistake AI assistants consistently make is loading the entire product catalog into a static <select> upfront. WC has a built-in AJAX endpoint for exactly this, with proper variation support, and the wiring is two HTML attributes plus a server-side pre-render of the saved options.

Misconception this skill corrects

"I'll query all products with posts_per_page = -1 and feed them into a <select> for the user to pick from."

A WC store can have 20,000+ products plus 10× that in variations. Loading them all server-side is a hard timeout on render and a hard browser-freeze on render-into-DOM. WC ships an AJAX search endpoint for exactly this case — and it has a separate variant that includes variations.

When to use this skill

Trigger when ANY of the following is true:

  • Building a product picker in any plugin admin UI (meta box, settings page, dashboard widget, modal, custom column inline editor).
  • The user mentions "select2 with products", "product autocomplete", "dropdown of products" in WC context.
  • Reviewing code where you see <select> populated by a WP_Query/get_posts over product post type — replace that pattern.
  • The diff contains wc-product-search, selectWoo, wc-enhanced-select, or data-action="woocommerce_json_search_*".
Installs
1
GitHub Stars
22
First Seen
1 day ago
wc-product-search-select — lonsdale201/wp-agent-skills