Already liking them might be the first thing. If my spouse would get a disease that made him look hideous I would still love him.
Other than that... a lot of things really. Unless we are talking really hideously bad looking, I don't think it would be much of a problem for me, if other things were there. Pretty looks could be a treat, but not necessary.
Once loving someone different aspects become dear anyways, that would perhaps not have registered as attractive before. (And for me often the traits of those I have been into before remain things I find attractive in others later, even if the general consensus might see it as a flaw).
Empathy and caring is very important to me, kindness. Intelligence not far below mine, but I think not far above either, it is about being in sync, able to understand each other and communicate somewhat easily. Imagination is also very attractive. Oh, and voices! sometimes overlooked, likely because you can't see them
. An attractive voice can be of more importance than looks I think. Two of the people I had long time secret crushes on in my life, I felt attracted to the first time I heard them, when sitting with my back to them, so not seeing what they looked like until later. Had they been ugly... not sure, but I think the interest already sparked would have lasted. But they weren't, one was probably considered neutral and the other looked good.
I think more than looks, hygiene might be something to put me off when it comes to the physical. I imagine I would find it much easier to be with an ugly person than a very smelly and dirty person.