It was narrated from Abu Hurairah that the Prophet (ﷺ) said:
“If anyone of you is invited to eat when he is fasting, let him say: ‘I am fasting.’”