AACsearch
Connectors & Widget

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 previewmodules/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 categories and tags

Supported versions

ComponentTested versions
WordPress6.2 – 6.5
PHP7.4 – 8.3
Polylang3.4+
WPML4.6+

Installation

  1. In your AACsearch dashboard, create a search index and a connector token (Connectors → New Connector Token). Copy the plaintext token immediately.
  2. 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/*'
  1. In your WordPress admin, Plugins → Add New → Upload Plugin. Upload the zip.
  2. Activate AACsearch Search.
  3. 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)
  4. Click Test connection. A successful response confirms the handshake passed.
  5. Click Run full sync to enqueue every published post / page / custom post type.

Field mapping

For a typical post-type entity:

WordPress fieldAACsearch fieldNotes
post_idexternal_idStable post primary key
post_titletitleStripped of shortcodes
post_contentdescriptionHTML stripped and shortcodes processed
post_typeattributes.typepost, page, custom type slug
Categories (taxonomy)categoriesFull term hierarchy
TagstagsFlat list
Featured imageimage_urlFirst selected size
Polylang / WPML languagelocaleOne document per language; external_id suffixed by locale
Permalinkproduct_urlUsed by the widget for click-through
ACF / custom metaattributes.*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 / update
  • wp_trash_post and before_delete_post — delete from index
  • transition_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 --quiet

The plugin exposes a WP-CLI command set: wp aacsearch sync:full, wp aacsearch sync:delta, wp aacsearch diagnose.

Troubleshooting

SymptomCauseFix
Test connection 401Empty or wrong tokenRegenerate token in AACsearch dashboard
Full sync hits PHP timeoutmax_execution_time too lowRaise to 120s or run via WP-CLI which bypasses HTTP timeouts
Memory exhausted on full syncmemory_limit too lowRaise to 512M or lower the batch size in plugin settings
Custom fields missing in searchACF / meta keys not added to Indexed metaAdd the meta keys explicitly; the plugin does not index all meta
Cron skipping syncsDISABLE_WP_CRON enabled with no replacementSchedule wp aacsearch sync:full via system cron
Polylang documents collapsedPolylang post translations not detectedCheck 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.

On this page