Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Checkout UI - change shipping address

Checkout UI - change shipping address

EYOND
Shopify Partner
4 0 9

Hello!

I am currently trying to solve a problem with the new Checkout UI feature:

During the checkout, we have to adjust the customer's shipping address if certain requirements are met.

 

With the standard API provided, one can read the shipping address but not write to it:

https://shopify.dev/api/checkout-extensions/checkout/extension-points/api#standardapi

 

Is there any way to adjust the shipping address from within a Checkout UI extension?

Replies 4 (4)

Solutio
Shopify Partner
9 1 0

SachaBobinet
Shopify Partner
3 0 0

Hello,
Any news on that ? Did you succeed on applying change ? 

For my part didn't find any solutions to "write" change on user input shipping address

otlit
Tourist
6 0 5

We also need this functionaility as it is a must to work with our business partner. Also for watermark how can we do it without checkout.liquid? If any of these cannot be done we may have to move away from Shopify.

jamalali81
Shopify Partner
25 0 4

Try this:

export default extension('purchase.checkout.delivery-address.render-after', (root, api) => {
await api.applyShippingAddressChange({
type
: 'updateShippingAddress'
      address: {
        zip: 'NEW ZIP'
      }
  });
});

 

More info here: https://shopify.dev/docs/api/checkout-ui-extensions/2023-10/apis/addresses#checkoutapi-propertydetai...