Not sure if anyone needs this but figured I'd share it in case it helps anyone, I found a way to hide specific discount codes from the cart without much difficulty.
Basically client wanted 1 specific item on the store to have free shipping and didn't really mind if shipping was free if a customer bought something else with the item (since they had free shipping for orders over a certain amount and the items cost was fairly close to the threshold), so I made a discount code for 100% off shipping and added it to the add to cart button (e.g. <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=XXXXXX&cl=YYYYYY&ejc=2&discount_code=yourdiscountcode">
)
But then the problem was when the item was added to the cart the discount code would show up in the cart and could be copied and re-used for other orders for free shipping without the specified item, sure I could set a minimum price for the discount but it would still be used without the item, but the client didn't want to just hide discount codes as they had other codes customers could enter and wanted those to be visible.
With some poking around I discovered that you can apply custom styles to the cart popup in the cart editor by using the "User Text" text box, just enter in <style> </style>
and you can have css code applied to the cart, if you enter in a css style that targets a specific discount code you can make it disappear without affecting any of the others (e.g. <style>span[data-name="yourdiscountcode"] {display:none !important;} </style>
)
This is of course useful for other cosmetic changes to the cart, hopefully it doesn't get patched out, or at least if it does that a simple 'hide in cart'/'visible to user'/etc toggle option could be added to discount codes first.