For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hello @xBei-Qiu
Enabling the "App Embeds" extension automatically isn't feasible. Instead, you can redirect through your app within the App Embedded Block. These extensions only become enabled for merchants to save them after activating the block.
Here's an example link for redirection:
https://admin.shopify.com/store/${shopName}/themes/${themeEditorId}/editorcontext=apps&template=index&activateAppId=${EXTENSION_ID}/${EXTENSION_NAME}
In this link:
themeEditorId is obtained via the admin REST API theme.json.
EXTENSION_ID is Enter Your theme app extension id.
EXTENSION_NAME is your theme app extension name.
If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.
thank.
your solution work.
activateAppId=${EXTENSION_ID}/${EXTENSION_NAME}
const actAppId = encodeURIComponent(`${EXTENSION_ID}/${EXTENSION_NAME}`);
const url = `https://admin.shopify.com/store/${shopName}/themes/current/editor?context=apps&activateAppId=${actAppId}`;
but
I still hope to find a way to automatically activate it
but,
@xBei-Qiu
Automated activation isn't feasible within Shopify. All Shopify apps available in the store necessitate manual steps for enabling the extension on the store, as indicated in the provided code above
If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.