Skip to content

Host actions, Connect with Datalumo, and Woo sync - #1

Open
jeffreyvr wants to merge 6 commits into
mainfrom
feature/woo-add-to-cart-host-action
Open

Host actions, Connect with Datalumo, and Woo sync#1
jeffreyvr wants to merge 6 commits into
mainfrom
feature/woo-add-to-cart-host-action

Conversation

@jeffreyvr

@jeffreyvr jeffreyvr commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Listens for confirmed Datalumo host actions: add_to_cart, view_cart, open_checkout, and open_page. Variable products return nested choices. Product pages send product_id as chat context.
  • Connect with Datalumo starts a grant on the Datalumo app, then exchanges a one-time code. Manual setup is token-only via GET /api/v1/me. Widget keys and secrets are rejected in the token field.
  • After connect, a short checklist covers what to sync, chat, and enhanced search. Tabs and the Need help sidebar stay hidden until setup is ready.
  • The self-hosted Datalumo URL sits behind Using a self-hosted Datalumo? It opens when a non-cloud URL is already stored.
  • WooCommerce products sync short description, product categories and tags, visible attributes, and SKU (including variations).
  • Every first-party folder has a silence-is-golden index.php. Vendor copies are stamped on composer dump-autoload.

Pairs with datalumo/datalumo#5.

This PR is the product work. WordPress.org listing prep (drop the GitHub update checker, license, Plugin Check cleanups) stays on #2 for later.

Test plan

  • Simple product: confirm add to cart from chat, cart has the line.
  • Variable product with colour and size: pick both, cart line has both attributes.
  • From a WordPress site, press Connect with Datalumo. Complete the grant and land back on Settings → Datalumo with a source and token stored.
  • Cancel on the grant screen returns to Settings → Datalumo.
  • Manual connect: paste an org API token (not a widget key) and Connect & test.
  • Open Using a self-hosted Datalumo?, set a custom URL, and confirm connect hits that host.
  • After connect, finish the checklist. Tabs and Need help appear only when setup is ready.
  • Sync a variable product and confirm short description, categories, tags, visible attributes, and SKU are searchable.
  • composer test

jeffreyvr and others added 4 commits August 28, 2026 12:58
Confirmed add_to_cart events write to the visitor cart. Variable products send nested colour then size choices in one reply, and product pages pass product_id as chat context.

Co-authored-by: Cursor <cursoragent@cursor.com>
Confirmed chat events open the Woo cart or checkout, a published page, or a form. Product and other singular pages send page_id as context.

Co-authored-by: Cursor <cursoragent@cursor.com>
The embed only applies datalumo:action-result to the in-flight confirm, so the fallback event must include run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Guessing a form on the current page was not useful; Open this page covers contact flows. Local WP_ENVIRONMENT_TYPE uses time() for script cache busting instead of bumping the plugin version.

Co-authored-by: Cursor <cursoragent@cursor.com>
Owners can grant access from WordPress instead of pasting keys. Products now send short description, categories, tags, visible attributes, and SKU.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jeffreyvr jeffreyvr changed the title WooCommerce add-to-cart from chat Host actions, Connect with Datalumo, and Woo sync Aug 28, 2026
fresh-site and ensure-index-php are maintainer tools, not something a WordPress site should receive.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant