The goal of this paper is to analyze how the celebrated phase transitions of the XY model are affected by the presence of a non-elliptic quenched disorder. In dimension \(d=2\) , we prove that if one considers an XY model on the infinite cluster of a supercritical percolation configuration, the Berezinskii–Kosterlitz–Thouless (BKT) phase transition still occurs despite the presence of quenched disorder. The proof works for all \(p>p_c\) (site or edge). We also show that the XY model defined on a planar Poisson-Voronoi graph also undergoes a BKT phase transition. When \(d\ge 3\) , we show in a similar fashion that the continuous symmetry breaking of the XY model at low enough temperature is not affected by the presence of quenched disorder such as supercritical percolation (in \(\mathbb {Z}^d\) ) or Poisson-Voronoi (in \(\mathbb {R}^d\) ). Adapting either Fröhlich–Spencer’s proof of existence of a BKT phase transition (Fröhlich and Spencer in Commun Math Phys 81(4):527–602, 1981) or the more recent proofs (Lammers in Probab Theory Relat Fields 182(1–2):531–550, 2022; van Engelenburg and Lis in Commun Math Phys 399(1):85–104, 2023; Aizenman et al. in Depinning in integer-restricted Gaussian Fields and BKT phases of two-component spin models, 2021. arXiv preprint arXiv:2110.09498; van Engelenburg and Lis in On the duality between height functions and continuous spin models, 2023. arXiv preprint arXiv:2303.08596) to such non-uniformly elliptic disorders appears to be non-trivial. Instead, our proofs rely on Wells’ correlation inequality (Wells in Some Moment Inequalities and a Result on Multivariable Unimodality. PhD thesis, Indiana University, 1977).