I've been instructed to stop breastfeeding

Do

My paediatrician has informed me i need to stop breastfeeding in order for 8mo baby to gain weight. Has anyone else heard of this suggestion?

Baby is not gaining weight properly. I nurse mostly at night.and baby is eating solids during the day. We never managed to transition to formula. I wish I had introduced a bottle at 6 weeks...