Abdullah bin Abbas reported,

A concession was granted to the elderly man and the elderly woman, while they were still able to fast, that they could break their fast if they wished and feed a poor person in place of each day. Then this was abrogated by the verse, "So whoever among you witnesses the month, let him fast it" [Baqarah 2:185]. The ruling remained in place for the elderly man and the elderly woman when they could no longer endure fasting, and for the pregnant woman and the nursing mother when they feared for themselves, that they may break their fast and feed a poor person in place of each day.

Azami 4301

Sahih

عن ابن عباس أنه قال

رخص للشيخ الكبير والعجوز الكبيرة في ذلك وهما يطيقان الصوم أن يفطرا إن شاءا، ويطعما مكان كل يوم مسكينا، ثم نسخ ذلك في هذه الآية: {فمن شهد منكم الشهر فليصمه} [البقرة: ١٨٥] وثبت للشيخ الكبير والعجوز الكبيرة إذا كانا لا يطيقان الصوم، والحامل والمرضع إذا خافتا أفطرتا وأطعمتا مكان كل يوم مسكينا.

الأعظمي 4301صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Obligation of fasting, its virtue, and its rulings
Section
Those who said it applies to the elderly, the nursing mother, and the pregnant woman and is not abrogated
Numbering
Jami al-Kamil 4301 (2nd edition)
Azami 4301