How can we archive discontinued product variants without deleting their history?

who made the custom code for you? Does it work well? Archiving the variant removes the Variant from all storefronts? Does it just place the Variant in the “Archived” section of the Products tab in Shopify, along with the standardly-archived Products? I might as well reach out to them to make the customization for us too