Returns whether or not a given capability of an extension is granted.
Returns whether or not a given capability of an extension is granted.
capability: Capability
export function useExtensionCapability(capability: Capability): boolean { return useExtensionCapabilities().includes(capability); }
The capabilities an extension has access to. * [`api_access`](/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. * [`network_access`](/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. * [`block_progress`](/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior.
'api_access' | 'network_access' | 'block_progress'