WooCommerce plugin docs / Orders

Orders

Overview

Shoppers can ask about their orders. Every lookup re-checks ownership. Guests must verify order number + billing email. The chat UI does not show billing addresses or payment card data.

How It Works

  • Logged-in: list_my_orders (max 10) and get_order for owned IDs via wc_get_order() / wc_get_orders() (HPOS-safe).
  • Guest: verify_guest_order then details.
  • Optional shipment tracking from _wc_shipment_tracking_items meta (WooCommerce Shipment Tracking-style). Filter aiwsa_order_tracking.
  • Custom number maps: aiwsa_resolve_order_number.

How to Enable It

WooCommerce → AI Assistant → Order Assistant → enable the three tools.

Configuration

Order Assistant settings.

Frontend Usage

Logged-in: “Where is my order?” Guest: provide #1042 and the checkout email.

Example

Customer ID 12 asks for order 1042; if order.customer_id matches, status + items + total + tracking (if any) are shown.

Behavior

SituationWhat happens
Wrong email / not ownerNo order data
Guest tools offGuests cannot verify
Refunded/cancelledStatus label from WooCommerce (whatever statuses exist on the order)
No tracking pluginShipping section without tracking numbers

Supported statuses are whatever WooCommerce stored on that order. The plugin does not invent a private status list.

Security restrictions

  • Ownership rechecked every call.
  • No billing PII in the UI payload.
  • Rate limits apply.

Limitations

  • Not a full account dashboard (no invoice PDF, no pay-again).
  • Guest proof is order number + email, not a password.

Troubleshooting

“I can’t see my order”: log in, or verify email matches billing email exactly. Sequential vs custom order numbers: may need aiwsa_resolve_order_number.