WordPress & WooCommerce
WordPress connector for AACsearch — current support, install, field mapping, and WooCommerce status.
WordPress integration in AACsearch comes in two flavors:
- WordPress (non-WooCommerce) — search across posts, pages and custom post types. Early preview —
modules/wordpress/aacsearch-search/. - WooCommerce — search across products with WooCommerce-specific pricing, stock and variation data. Planned — separate mapper layered on top of the WordPress module.
This page documents both and explains the workaround for WooCommerce stores until the dedicated connector ships.
WordPress connector (Early preview)
The WordPress connector is shipped as a standard WordPress plugin under modules/wordpress/aacsearch-search/. It supports:
- Posts, pages, and any custom post types you register through filters
- Multi-locale catalogs via Polylang or WPML — one document per locale per post
- Featured image extraction
- Tag and category mapping into AACsearch
categoriesandtags
Supported versions
| Component | Tested versions |
|---|---|
| WordPress | 6.2 – 6.5 |
| PHP | 7.4 – 8.3 |
| Polylang | 3.4+ |
| WPML | 4.6+ |
Installation
- In your AACsearch dashboard, create a search index and a connector token (Connectors → New Connector Token). Copy the plaintext token immediately.
- Build the plugin zip from the source under
modules/wordpress/aacsearch-search/:
cd modules/wordpress/aacsearch-search
zip -r aacsearch-search.zip . -x '.distignore' '.wordpress-org/*'- In your WordPress admin, Plugins → Add New → Upload Plugin. Upload the zip.
- Activate AACsearch Search.
- Open AACsearch → Settings and paste:
- API URL: your AACsearch base URL (for example,
https://api.aacsearch.com) - Connector token: the
ss_connector_*token from step 1 - Index slug: returned from handshake (also visible in the dashboard)
- API URL: your AACsearch base URL (for example,
- Click Test connection. A successful response confirms the handshake passed.
- Click Run full sync to enqueue every published post / page / custom post type.
Field mapping
For a typical post-type entity:
| WordPress field | AACsearch field | Notes |
|---|---|---|
post_id | external_id | Stable post primary key |
post_title | title | Stripped of shortcodes |
post_content | description | HTML stripped and shortcodes processed |
post_type | attributes.type | post, page, custom type slug |
| Categories (taxonomy) | categories | Full term hierarchy |
| Tags | tags | Flat list |
| Featured image | image_url | First selected size |
| Polylang / WPML language | locale | One document per language; external_id suffixed by locale |
| Permalink | product_url | Used by the widget for click-through |
| ACF / custom meta | attributes.* | Configurable in AACsearch → Settings → Indexed meta |
Posts that are draft, scheduled, password-protected or trashed are excluded from indexing.
Real-time updates
The plugin hooks into:
save_post— delta sync on publish / updatewp_trash_postandbefore_delete_post— delete from indextransition_post_status— adds and removes documents on publish / unpublish
Scheduled re-indexing uses WordPress cron. If your site uses an external cron (DISABLE_WP_CRON), schedule the AACsearch full sync from your system cron instead:
*/30 * * * * wp aacsearch sync:full --quietThe plugin exposes a WP-CLI command set: wp aacsearch sync:full, wp aacsearch sync:delta, wp aacsearch diagnose.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Test connection 401 | Empty or wrong token | Regenerate token in AACsearch dashboard |
| Full sync hits PHP timeout | max_execution_time too low | Raise to 120s or run via WP-CLI which bypasses HTTP timeouts |
| Memory exhausted on full sync | memory_limit too low | Raise to 512M or lower the batch size in plugin settings |
| Custom fields missing in search | ACF / meta keys not added to Indexed meta | Add the meta keys explicitly; the plugin does not index all meta |
| Cron skipping syncs | DISABLE_WP_CRON enabled with no replacement | Schedule wp aacsearch sync:full via system cron |
| Polylang documents collapsed | Polylang post translations not detected | Check that Polylang is active before AACsearch in plugin order |
WooCommerce (Planned)
The WordPress plugin recognizes the product post type registered by WooCommerce but maps it as a generic post — it does not currently surface WooCommerce-specific data such as variations, price tiers, stock or attribute taxonomies. For stores that need correct WooCommerce search today, three options:
Option 1 — generic WordPress connector (limited)
Install the current WordPress plugin as documented above. Products will appear in search with title, description, categories and tags. Pricing, stock and variations will be missing. This is acceptable for content-heavy WooCommerce stores where search is mostly informational.
Option 2 — custom connector
Build a WooCommerce-specific exporter using the Custom Connector developer guide. Pull from wc_get_products(), iterate variations with WC_Product_Variable::get_available_variations(), and map into SyncProductInput. Reference template: modules/wordpress/aacsearch-search/ plus the PrestaShop mapper in modules/prestashop/aacsearch/src/Exporter/.
Option 3 — wait for the dedicated WooCommerce connector
The WooCommerce-specific mapper is on the roadmap (wiki/tasks/cms-platform-expansion.md § A2). Planned coverage:
- Simple, variable and grouped products
- Variation-level documents with shared parent metadata
- Regular and sale prices, plus dynamic pricing (Subscriptions, Bookings)
- Stock by warehouse (Multi-Inventory) and backorders
- Product attributes as facetable fields
- Polylang / WPML and WooCommerce Multilingual locale split
Subscribe to the AACsearch changelog or watch the issue to get notified when this ships.
Related pages
Shopify Connector
Shopify connector for AACsearch — OAuth install flow, webhook-driven delta sync and product mapping. Early preview.
Headless CMS Integrations
How AACsearch integrates with headless CMS platforms — Strapi, Sanity, Contentful, Directus and Payload — and when to choose a plugin vs an integration guide.