Thank you for reaching out and posting this question!
I wasn’t having any luck viewing the link, as it seems to be pointing to the Store editor in the back-end of your admin. However, copying the coding from one theme to another may not work, as the coding can vary between themes. Nevertheless, we’ve got a step-by-step guide to help you with this, Hide sold out variants.
If you’re using a Shopify-supported theme and your store is subscribed to a plan, then our Theme Support team can help with implementing this guide for your theme. While we’re not able to provide account-specific support via the Shopify Community at this time, we’d be happy to assist you with a customization request through live chat, email, or callback. Please visit the Shopify Help Center and log in to your account to create a support request.
I’d love to know if our guide can help you with this. Let me know!