Skip to content

@spwig/react 2.1.0

Choose a tag to compare

@dayyanj dayyanj released this 26 Jul 13:36
· 2 commits to main since this release

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 wrapping checkout.setContact(). Records
    the customer's email/name (optionally creating and signing in an account
    when a password is 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 the analytics.traffic scope.

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.