Again Valid Discount Code Passed As A Query Parameter To Checkout But It's Not Applying To Order

Shopify removed this feature due to privacy reasons. Instead use the following workaround:

https://store.myshopify.com/discount/DISCOUNT_CODE?redirect=/checkout

//my example
let baseUrl = window.location.protocol + "//" + window.location.hostname;
checkout.attr('href', `${baseUrl}/discount/${discountCode}?redirect=/checkout`);