Ecommerce Shopify WordPress Discussion

Shopify checkout UI how to retreive DeliveryMethodDefinition id of the selected shippingOption

I am working on an app on Shopify's checkout extension UI, I want to show a Banner under shippingOptions using the target "purchase.checkout.shipping-option-item.render-after", in this Banner I want to show custom delivery times depending on the items in the cart, client's address and shippingOption, I can get the items in the cart and client's address but for the shippingOption I only have it's name and a long string called "handle" as I think can be useful using "useShippingOptionTarget()", but I need the shippingOption's "DeliveryMethodDefinition" id that I can get from the admin GraphQL with "deliveryProfiles", but I can't find a way to link one to the other Here my jsx file import { Banner, useApi, useTranslate, reactExtension, useShippingOptionTarget, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.shipping-option-item.render-after', () => <Extension />, ); function Extension() { const translate = useTranslate(); const { extension } = useApi(); const shippingOption = useShippingOptionTarget(); console.log(shippingOption) return ( <Banner title="checkout-ui"> {translate('welcome', { target: })} </Banner> ); } I tried to link using names, but when there is multiple that has same name I have to get price and weight of items and calculate which one to select but if there is a new or something is updated on 1 I have to change code so it's not maintainable. I tried using the long string in the handle as an ID (hopping it would be useful) but couldn't find what was it's purpose as I couldn't do anything, and I think Shopify docs are not clear when things gets a bit harder...
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.