Hadith 737
Abu Hurairah (May Allah be pleased with him) reported:
Abu Huraira's storyعن أبى هريرة رضى الله عنه قال: قال رسول الله صلى الله عليه وسلم : "إذا دعي أحدكم ، فليجب، فإن كان صائما فليصل، وإن كان مفطراً فليطعم" .((رواه مسلم))
The Messenger of Allah (ﷺ) said, "When any of you is invited to a meal, he should accept the invitation. If he is observing Saum (fasting), he should supplicate for the betterment of the host and if he is not fasting, he should eat." [Muslim].
In plain words
When invited to a meal, accept the invitation. If you are fasting, pray for blessing on your host instead of eating, and if not, then eat. Either way, honor the one who invited you.
Riyad as-Salihin 737 · Book 2, Hadith 11