How it works
What happens when a customer looks up an order, how the timeline is worked out and where the data comes from.
A lookup, step by step
- The customer submits the form
With JavaScript the form sends the order number and email to the REST endpoint
/wp-json/siteryn-track-order/v1/trackand shows the result without reloading. Without JavaScript the page posts back and renders the result. - The request is checked
The form nonce must be valid. If order tracking is off, or the visitor is a guest and Guest Tracking is off, the lookup stops with a message.
- Throttling
If the visitor (or the order number) has too many failed lookups in the last 15 minutes, the "Too Many Attempts" message is shown.
- The order is found and verified
The typed number (spaces and a leading # removed) is matched to an order. Guests must give the billing email of that order; signed-in customers can open their own orders without it. Pro can add more checks.
- The result is shown
A verified order shows its result card. Anything else shows the same "No Matching Order" message and counts as a failed lookup.
What the result shows
- Header: "Order #number", "Placed on" date and the order status as a colored chip.
- Status message for the current stage (see Messages).
- Timeline: the steps and the dates they were reached.
- Shipment: carrier, tracking number with a copy button, ship date and a "Track with <carrier>" link.
- Order summary: items, total, shipping method and (optionally) the destination city and country.
Payment details, email addresses, street addresses, customer notes and private order notes are never shown.
- Order #7063 with the "Processing" chip and the message "Good news: we're preparing your order for shipment."
- Timeline: Order placed done, Processing current, Shipped and Delivered upcoming
- "Tracking details will appear here as soon as your order ships."
- Order summary: Classic Cotton Tee × 2, Leather Chelsea Boots × 1 and the total
Stages
The stage decides which status message shows.
| Stage | When |
|---|---|
| Pending payment, On hold, Cancelled, Refunded, Failed | The order has that WooCommerce status. These orders show their message instead of moving along the timeline; cancelled, refunded and failed orders stop it. |
| Completed | The order is Completed. |
| Shipped | The order has at least one tracking number and is not in one of the statuses above. |
| Processing | Any other order. |
| Partially shipped, Out for delivery, Delivered, Delivery problem Pro | Worked out from Pro's shipments and carrier statuses. See stage messages. |
Where the data comes from
- Order details come straight from WooCommerce through its order API, so HPOS and legacy storage both work. The plugin adds no database tables.
- The Free tracking number is stored on the order as meta
_siteryn_track_order_shipment. Pro stores a list of shipments in_siteryn_track_order_pro_shipmentsand shows them everywhere Free shows tracking. - Other plugins can add shipments through a shipment provider. See Developer guide.
Caching and privacy
The tracking page (and any page with the shortcode or block) tells caching plugins not to cache it and sends no-cache headers, because results are personal. The order number and email are only used to find and verify the order; they are not stored. Failed lookups are counted for 15 minutes against a hashed identifier, never the raw IP address. Suggested privacy-policy text is added under Settings → Privacy → Policy Guide.
On phones
- The result card at 390 px wide
- The timeline is vertical: Order placed and Processing done, Shipped current, Delivered upcoming
- The USPS shipment card with the tracking number, ship date, estimated delivery (Pro) and "Track with USPS"
- The order summary below
The layout is mobile first and the timeline is always vertical on phones. It is keyboard and screen reader friendly (WCAG 2.2 AA target) and works without JavaScript.