Hey guys ! Basically im trying to refer from the thank you page to the order status page with a Checkout UI extension.
const { orderConfirmation } = useApi();
const { number , id } =useSubscription(orderConfirmation);
This is the hook i need and the number is indeed returning , but the id is returning.
not.purchase.thank-you.block.render this is the block render target that i am in.
You’re encountering an issue where the order id isn’t immediately available from the orderConfirmation API within your Shopify Checkout UI Extension, preventing you from linking to the order status page. While the documentation suggests id should be present, this is often a timing issue due to the asynchronous nature of the useSubscription hook. To fix this, use a useEffect hook to wait for both the id and shop.storefrontUrl to be available, then dynamically construct the order status URL. There’s no built-in component that directly navigates to the order status page without building the URL yourself; explicitly constructing the link with the id is the standard method.