# useExtension Returns the metadata about the extension. ## ### UseExtensionGeneratedType Returns the metadata about the extension. #### Returns: Extension export function useExtension(): Extension { return useApi().extension as Extension; } ### Extension Meta information about an extension target. ### apiVersion value: `ApiVersion` The API version that was set in the extension config file. ### capabilities value: `StatefulRemoteSubscribable` The allowed capabilities of the extension, defined in your [shopify.extension.toml](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file. * [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. * [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. ### editor value: `Editor` Information about the editor where the extension is being rendered. The value is undefined if the extension is not rendering in an editor. ### rendered value: `StatefulRemoteSubscribable` Whether your extension is currently rendered to the screen. Shopify might render your extension before it's visible in the UI, typically to pre-render extensions that will appear on a later step of the checkout. Your extension might also continue to run after the buyer has navigated away from where it was rendered. The extension continues running so that your extension is immediately available to render if the buyer navigates back. ### scriptUrl value: `string` The URL to the script that started the extension target. ### target value: `Target` The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file. ### version value: `string` The published version of the running extension target. For unpublished extensions, the value is `undefined`. ### Editor ### type value: `"checkout"` Indicates whether the extension is rendering in the checkout editor. ## Related - [StandardApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi) - [CheckoutApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/checkoutapi) - [OrderStatusApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/orderstatusapi) - [CartLineItemApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/cartlineitemapi) - [PickupPointListApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/pickuppointlistapi) - [PickupLocationListApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/pickuplocationlistapi) - [ShippingOptionItemApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/shippingoptionitemapi) - [ExtensionTargets](https://shopify.dev/docs/api/checkout-ui-extensions/apis/extensiontargets)