Hide out of stock variants

Thanks for your reply. I’ve just given this a try and It doesn’t seem to be working. We are using the colour swatches, not sure if the code would need tweaking for this?

Thanks for your help.