For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi,
I would like to add a Checkout UI Extension with target on a thankyou page. I wanted a button, upon clicking opens up the print dialogue box. This functionality is for the customers to print the invoice. I tried window.print() which threw some console errors like 'window isn't defined'. Is it possible to implement this ?
Hi Kevingeorgex,
Checkout extensions do not have access to window & document objects since they are loaded in a restricted environment, so you'll need to explore alternative options for achieving the functionality you're looking for.
Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog
Hi Liam,
Thanks for the response. Is there any alternative options possible other than using a UI extension while using checkout extensibility for thankyou page ? Third party apps aren't supported. I can revert to using apps and additional scripts until 2025 august.