All perfect praise be to Allah, The Lord of The Worlds. May His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
Whosoever broke fast during Ramadan with a valid excuse and became able to make up for it, but died before doing so, it is recommended for his guardian to make up for his/her missed fasts. If the guardian failed to do that then he is required to feed one poor Muslim one Mudd (600g) from the common food of the country-to be paid for from the wealth of the deceased-for each missed fast. As for the person who passed away before being able to make up missed fasts of Ramadan, neither he nor his guardians are accountable for making up those fasts and they are free from the liability before Allah, as mentioned in Fatwa No.(
626).
In this regard, Al-Imam An-Nawawi (may Allah have mercy on his soul) stated: "There are two situations as regards the person who was liable for making up missed fasts of Ramadan, but passed away before doing so:
The first situation: The deceased broke fast with a valid excuse and this excuse lasted until he passed away. Some examples on this excuse are: continuous sickness, being on journey, being in a comma, confinement (postnatal bleeding), pregnancy, breast feeding and so on. In this case, nothing is due on his wealth or his heirs and they aren’t required to fast on his behalf or feed a poor Muslim for each missed fast, and this is as agreed by jurists of our doctrine (Shafie).
The second situation: The deceased was able to make up the missed fasts-whether they were with or without a valid excuse-but didn’t. There are two widespread sayings in this regard, the correct one according to our fellow scholars is that his guardian is permitted to fast on his behalf, which is valid and avails instead of feeding a poor Muslim a Mudd for each missed fast, and the deceased is cleared from liability before Allah. The evidence on this is that A’isha (may Allah be pleased with her) narrated that the Messenger of Allah (PBUH) said: "Whoever dies while he still has some fasts to make up (of the days of Ramadan), then his heir (any of them) should fast on his behalf.” [Agreed upon} "{Al-Majmou`, vol.6, pp.415}. And Allah the Almighty Knows Best.