@spwig/react 2.1.0
2.1.0 (2026-07-26)
Tracks @spwig/sdk 2.1.0 and the wider Spwig 1.7.0 release. Additive.
Requires @spwig/sdk ^2.1.0.
Added
useSetContact()— mutation wrappingcheckout.setContact(). Records
the customer's email/name (optionally creating and signing in an account
when apasswordis given) and invalidates the checkout session. Required
before completing digital-only / booking-only carts, which skip the shipping
step where an email would otherwise be captured.useAdminTraffic(params?)— query wrapping
admin.analytics.getTraffic(): visitor overview, daily trends, top pages,
geographic distribution, and referrers. Reachable by a merchant API token
holding theanalytics.trafficscope.
Fixed
- Exported the checkout tender hooks —
useCheckoutTenders,
useAddGiftCardTender,useAddWalletTender,useRemoveTender. They shipped
in 2.0.0 but were never re-exported from the package root, so they could not
be imported from@spwig/react.