useOrderStore

useOrderStore: UseBoundStore<Write<StoreApi<OrderState & OrderActions>, StorePersist<OrderState & OrderActions, OrderState & OrderActions>>>

Source: order.state.ts:135

The order store — the completed order plus post-purchase upsell tracking (which upsells were viewed, accepted, or skipped). Populated after checkout and used to drive the receipt and upsell pages.

isOrderExpired() checks 15 minutes since the order was loaded or set. Persistence does not remove stale orders on a timer or during rehydration. Custom readers must check loading, errors, expiry and URL reference identity; see the order-store integration contract.

Type

UseBoundStore<Write<StoreApi<OrderState & OrderActions>, StorePersist<OrderState & OrderActions, OrderState & OrderActions>>>

Example

CODE
const order = useOrderStore.getState().order;
console.log(order?.number);