The Republic of Ireland midfielder will stay at the League One side until the summer of 2021.
Fleetwood boss Joey Barton says the 36-year-old made a "superb impact" after joining from Hearts and he's "delighted" that the Dubliner has agreed to extend his stay.
Advertisement
Whelan joined the English team at the end of January this year, with his contract originally set to last until the end of the season.
He made the move after being dropped by Hearts manager Daniel Stendel, commenting that the way he was released from the Scottish side was "amateurish".