Error with the useCustomer react hook in a B2B checkout

Error with the useCustomer react hook in a B2B checkout

joelurraco
Shopify Partner
19 0 14

Hello,

 

We are developing a checkout UI extension where we are using the 'useCustomer' React hook.


There is an error when entering the checkout as a B2B customer, this error appears on the browser's console:

 

UnhandledCustomerProfileError: Unknown CustomerProfile type: BusinessCustomerProfile
  at app.latest.es.4ba2baaac75d1099a8d2.js:1:155729
  at d (app.latest.es.4ba2baaac75d1099a8d2.js:1:155802)
  at fo (app.latest.es.4ba2baaac75d1099a8d2.js:1:156751)
  at d.shop (app.latest.es.4ba2baaac75d1099a8d2.js:1:178092)
  at t (app.latest.es.4ba2baaac75d1099a8d2.js:1:178241)
  at Object.mount (app.latest.es.4ba2baaac75d1099a8d2.js:1:178377)
  at Object.render (app.latest.es.4ba2baaac75d1099a8d2.js:1:180092)
  at Object.__ (app.latest.es.4ba2baaac75d1099a8d2.js:1:73136)
  at R (vendors-node_modules_bugsnag_js_browser_notifier_js-node_modules_vanilla-extract_sprinkles_cr-d894ae.latest.es.c6bbec948bd0ac712764.js:2:83949)
at Array.forEach (<anonymous>)

 

We not able to obtain the customer's information using the mentioned 'useCustomer' hook.

 

Reply 1 (1)

lizk
Shopify Staff
246 58 74

Hi there 👋

The team is actively working on extensibility with B2B checkouts, you can follow along with this Github issue.

To learn more visit the Shopify Help Center or the Community Blog.