The settings in Shopify allow you to require a phone number at checkout for ALL customers. We need to apply that setting to only international customers.
We have Shopify Plus, and have access to checkout.liquid. Here is was a support rep recommended:
“Since you are a Plus merchant, you have access to customizing your checkout with the custom checkout.liquid template. So in this case, you could implement some custom code that would allow you to detect the address/country entered and then check the phone value field.”
Is there an easy snippet of some kind we can throw in our checkout.liquid to achieve this? Thank you in advance.
Domestic shipments don’t need a phone number, but international shipments do. Shopify, just give us the ability to match this with optional domestic phone number and required phone number for international!
If anybody is still looking for an answer to this, there is a paid app that handles this exact problem.
The app is called ZonePhoneGate. Store owners are able to select countries (individually or by continent) in the app’s settings page, and then buyers with destination countries in that list, are required to enter a phone number at checkout, but only countries from the list, all others are not required to provide one.
Shopify does provide a free way to add a phone field at checkout that can either be mandatory for all customers or optional for all.
However, most merchants don’t want, and rightfully so, to require a phone number from everybody.
If the field is made optional, customers can just leave the field blank and continue with checkout. This can help reduce the problem, but it doesn’t solve it completely.
Full disclosure: I’m one of the people behind this app, which is listed on the Shopify App Store.
Five years on, the native setting is still all-or-nothing. But this is solvable now: a checkout validation function can require phone (or postal code) for only the countries you pick, or everywhere except your home country, and checkout won’t complete until it’s filled. Correcting the earlier replies too, this does not need Plus. Plus gates the native checkout-rules UI, not functions shipped by an app.
My team built Switchboard, which has this exact rule (require-fields, per-country, your own message, no code) and the free plan runs it. That’s my disclosure and, five years in, hopefully a real answer for the thread.