Shopify Checkout UI Extension: Programmatic Environment Version

I am developing a Checkout UI Extension that requires a method to programmatically retrieve the current Shopify environment version. The primary purpose of this requirement is to implement environment-specific routing for a “Learn More” link. I have two different learn more links depending on which Shopify environment I am on.

My question is: Is there an accessible property, API, or established method within the UI extension’s runtime to reliably deduce whether the code is currently executing in a dev or prod Shopify environment?

Hi @San_Romont

I don’t think there’s a way via the API to check if an evironment is prod or dev, but you could possibly infer from the shop domain that you can access with the Shop
API
.

Would this work for you?