Stanisław Herakliusz Lubomirski commissioned the church as a family mausoleum. Tylman van Gameren designed it alongside a Bernardine monastery.