Yes, Shopify removed this feature for privacy reasons. Instead, you can use a workaround:
https://store.myshopify.com/discount/DISCOUNT_CODE?redirect=/checkout
Here is my code for it:
var baseUrl = window.location.protocol + "//" + window.location.hostname;
checkout.attr('href', `${baseUrl}/discount/${discountCode}?redirect=/checkout`);