useOrderStore

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

Source: order.state.ts:133

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.

Note: this store expires 15 minutes after the order completes, so upsell pages can't be replayed indefinitely.

Type

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

Example

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