Hello,
We can access the shipping address in Cart and Checkout Functions, but we can’t access the billing address.
I know this was discussed here
Do we have any updates on this? Is there an alternative approach we can use?
Hello,
We can access the shipping address in Cart and Checkout Functions, but we can’t access the billing address.
I know this was discussed here
Do we have any updates on this? Is there an alternative approach we can use?
Hi @remy727,
We don’t have an update to share on that feature request at this time.
As a workaround, you can use billingAddress in a Checkout UI Extension.
Thank you, @Paige-Shopify
We want to block checkout when the billing address country is different from the shipping address country using a Cart or Checkout Validation Function.
So this can’t be achieved using a Checkout UI Extension.
Do you have any thoughts or alternative approaches?
In that case, I’d recommend using a Checkout UI extension to update either a cart attribute or a cart metafield, then using the Cart and Checkout Validation Function (targetting the cart) to validate that attribute or metafield.
I’ve tried a similar approach before, but I wasn’t able to get the Function to run each time the cart metafield was updated. It did consistently trigger when the cart attribute changed, though, so you may want to start there. That said, it’s possible you’ll have better results depending on your setup.