
Shipping methods are passed around as plain strings, so an order saved with a misspelled method quietly gets the slowest delivery and no tracking number.
Payment statuses arrive as text from two places: the live payment webhook must refuse any code it does not know, while the legacy import has to keep going and treat blank or unknown codes as still pending.
The size picker on the shirt page shows raw codes like XL, and every page that needs the default size or the sizes above a chosen one keeps its own copy of that logic.
Checkout adds up optional extras such as insurance, but gift wrapping is kept as a separate set of codes, so its price never reaches the order total.
Orders should move from pending through paid and shipped to delivered, or be cancelled before shipping; a delivered order must never be cancelled and order history must not be replayed from corrupt stored status text, while the order list must still show orders with a missing or unreadable status as new.