Shopify / ui-extensions

MIT License
260 stars 36 forks source link

Unable to Access deliveryGroups() Method with customer-account.order-status.block.render Target #2195

Open metizror opened 1 month ago

metizror commented 1 month ago

Description

I am currently working on a Shopify checkout extension and am using the customer-account.order-status.block.render target. However, I am unable to access the deliveryGroups() method from Shopify. I need to get the selected shipping method for a given order, but this method does not seem to be accessible in my current context.

Additionally, I am open to accessing the shipping method using any available order status page target.

Steps to reproduce the behavior:

  1. Create a Shopify checkout extension.
  2. Use the customer-account.order-status.block.render target.
  3. Attempt to access the deliveryGroups() method to get the selected shipping method.

Expected behavior

I should be able to access the deliveryGroups() method and retrieve the selected shipping method for the order.

mkupiniak commented 1 month ago

You likely forgot to enable the Protected customer data access in your app config. Go to your app settings > API Acess > Protected customer fields (optional) and select Address. For draft apps (non production) it will work immediately. For prod apps you need to wait for verification from Shopify.