We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to test buyerIdentity in checkout UI extension locally?

How to test buyerIdentity in checkout UI extension locally?

alex_dover
Shopify Partner
9 0 3

I'm in the early stages of building a checkout ui extension, specifically for the order status page.

 

I have the extension running locally and displaying correctly, however I really need to get the customer id or email given the use case of my app. I'm using a 'development' version of my app, however the customer details are always coming back as undefined.

 

According to the customer protected data page, to use it in development I need to select the fields I'd like to use in the partner dashboard, I don't need to submit it, which I have done and I can make requests to the admin api and see customer data.

 

Does anyone know of further steps I need to take for the useCustomer, or useEmail hooks to work when testing locally?

 

Thanks.

 

 

Replies 2 (2)

alex_dover
Shopify Partner
9 0 3

I think I may have answered my own question.

 

The useCustomer, useEmail and buyerIdentity only return a customer if they are logged in during the buying process. It doesn't return the customer associated with the order.

tanmaykejriwal
Shopify Partner
65 0 5

That is exactly correct , so basically require the store to have customer accounts mandatory !

TK