Check if Customer Accounts are hidden

radishhorse
Shopify Partner
5 0 1

Is there a way to check via the Shopify Admin REST API if a store's customer accounts are hidden? i.e. what you see when you go to settings > customer accounts.

 

Thanks!

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1322 218 457

Hi @radishhorse,

 

There is not a way to get that info via REST Admin API, however in the GraphQL Admin API the shop.customerAccounts attribute can give an indication of the store's customer account requirements with a query like this:

 

{
 shop {
   customerAccounts
 }
}

 

The checkbox near the top of Settings > Customer Accounts page of the admin can change this value between OPTIONAL and DISABLED, and to make it REQUIRED the option is under Settings > Checkout > Customer Contact Method.

 

Hope you have a great day,
Jon551

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog