If this related to specific APIs or components, please list them here
A (proposed) useBillingAddress() hook
Is your feature request related to a problem? Please describe.
Digital products/products that do not require shipping are not impacted by the Shipping and Delivery settings in the Shopify Admin. Merchants that want to restrict the fulfillment of these types of products to a specific country set are unable to do so with Checkout UI Extensions because there is no access to the Billing Address at checkout. The useShippingAddress() hook remains null/empty throughout the entire checkout journey for users that have a cart comprised solely of digital/non-shippable products.
The basic functionality of a client-side cart validation extension we were looking to build was:
If billing address is not the UK, block checkout progress and show a modal/error state with more information
Since the shipping step of checkout is skipped, there is no real way to validate a user's billing address for geofencing orders.
The absence of this hook results in an awful post-order refund process that could have been avoided with a hook for Billing Address info to use in validating a cart/checkout. This was previously implemented with a simple JavaScript manipulation of the country selector in checkout.liquid and proved to be very effective in blocking customers from non-accepted regions. (i.e. delete all other countries from the select element)
Describe the changes you are looking for
A useBillingAddress() hook that provides the exact same functionality as useShippingAddress().
Describe alternatives you’ve considered
We've attempted to use useShippingAddress() - but this is ineffective when used in context with digital/non-shippable products. It remains null/empty throughout the entire checkout journey for digital products orders.
Please list the related package(s)
checkout-ui-extensions
If this related to specific APIs or components, please list them here
A (proposed)
useBillingAddress()
hookIs your feature request related to a problem? Please describe.
Digital products/products that do not require shipping are not impacted by the
Shipping and Delivery
settings in the Shopify Admin. Merchants that want to restrict the fulfillment of these types of products to a specific country set are unable to do so with Checkout UI Extensions because there is no access to the Billing Address at checkout. TheuseShippingAddress()
hook remains null/empty throughout the entire checkout journey for users that have a cart comprised solely of digital/non-shippable products.The basic functionality of a client-side cart validation extension we were looking to build was:
Since the shipping step of checkout is skipped, there is no real way to validate a user's billing address for geofencing orders.
The absence of this hook results in an awful post-order refund process that could have been avoided with a hook for Billing Address info to use in validating a cart/checkout. This was previously implemented with a simple JavaScript manipulation of the country selector in
checkout.liquid
and proved to be very effective in blocking customers from non-accepted regions. (i.e. delete all other countries from theselect
element)Describe the changes you are looking for
A
useBillingAddress()
hook that provides the exact same functionality asuseShippingAddress()
.Describe alternatives you’ve considered
We've attempted to use
useShippingAddress()
- but this is ineffective when used in context with digital/non-shippable products. It remains null/empty throughout the entire checkout journey for digital products orders.Additional context