Sayyiduna Salamah bin Akwa’ (may Allah be pleased with him) narrates: When this verse was revealed, “And those who are able to fast but with hardship, they have (the option to) pay a ransom, feeding a poor person,” then whoever among us did not wish to fast would leave the fast and give the ransom, until the verse that came after it was revealed and it abrogated it.
Hadith Referenceصحیح ابن حبان / كتاب الصوم / 3478
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الإرواء» (4/ 22): ق.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده على شرط الشيخين