Addons to checkout with checkout.liquid

adamvincze
Visitor
1 0 0

Dear Shopify Comunity,

 

I am a member of the OptiMonk dev team, and we have some questions regarding checkout.liquid

- Is there any method to being notified about the Shopify shop package change (especially upgrading to Shopify Plus), webhook or something else?
- If the theme changed, the checkout.liquid will stay the same or it gets overwritten (along with any added code)?
- Should we take care if our script is removed from the checkout.liquid manually? If yes, then should we put it back or leave it as it is?
- If our app is uninstalled, do we have the authorization to delete our sript from checkout.liquid afterwards?

 

Thank you for your help!

Best Regards,
Ádám Vincze

Reply 1 (1)

Josh
Shopify Staff
1134 84 233

Hey Adam, 

 

I'll tackle these questions one at a time, but let me know if you need more clarity : 

 

- To be notified of shop subscription changes, you can subscribe to shop/update webhooks. They'll have a 'plan_name' field to indicate the shop's subscription type. 

 

- When referring to a theme change, do you mean if a shop publishes an entirely new theme, or just if other parts of the theme are edited? 

Each theme can have it's own checkout.liquid (provided the shop has a Plus subscription) so if a fresh theme is published, it will replace whatever was being used before and have a new checkout.liquid file, or none at all. 

 

Otherwise, it would depend on what part of a theme was being edited, and how. Other theme assets can be edited without any effect on a checkout.liquid file at all. Or if edited in the admin, it's possible to pick and choose which parts are changed. But if someone edits a checkout.liquid file with the API, it will overwrite whatever was already there. 

 

- I can't really say what you should do if a script of yours was removed from a checkout.liquid file since I'm missing a lot of context there. Ultimately that decision will be completely up to you, or the merchant. 

 

- Once your app is removed from a shop, any API access you previously had will be revoked. This means that you will not be able to remove any edits you've done to their theme on your own and it would have to be done by the merchant. 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog