website logo
Navigate through spaces
Chord Commerce
⌘K
Getting Started
CMS
Data
OMS
Integrations
👩‍💻Developer Tools
Shopify
Docs powered by archbee 

useUser

The useUser hook returns a series of methods for managing a Shopify customer account. The customer must have an active authentication session (see useAuth) for these methods to work.

useUser

user

Represents the current user.

Example:

user

status

String indicating the status of the user in Redux. This string can be used to determine if the user has been loaded yet, which happens asynchronously after page load.

Example:

status

createUserAddress()

Adds a new address to the Shopify customer's address book.

Example:

createUserAddress

loadUser()

Reloads the current user. This is automatically called on every page load and with every other useUser method.

Example:

loadUser

modifyUserAddress()

Updates an address in the Shopify customer's address book.

Example:

modifyUserAddress

modifyUserDefaultAddress()

Updates which address is marked as the default address in the Shopify customer's address book.

Example:

modifyUserDefaultAddress

removeUserAddress()

Removes an address from the Shopify customer's address book.

Example:

removeUserAddress
Updated 09 Nov 2022
Did this page help you?
Yes
No
UP NEXT
Guides
Docs powered by archbee 
useUser