Both al-Bukhārī and Muslim include this report in their two Ṣaḥīḥs (1) through the narration of Ibn Jurayj.
Muslim (2) also transmits it through Sufyān ibn ʿUyaynah, from Hishām ibn Ḥujayr, from Ṭāwūs, from Ibn ʿAbbās, from Muʿāwiyah with the same content.
Abū Dāwūd and al-Nasāʾī (3) likewise relate it through ʿAbd al-Razzāq, from Maʿmar, from Ibn Ṭāwūs, from his father.
ʿAbd Allāh, the son of Imām Aḥmad, said (4): “ʿAmr ibn Muḥammad al-Nāqid narrated to me; Abū Aḥmad al-Zubayrī narrated to us; Sufyān narrated to us, from Jaʿfar ibn Muḥammad, from his father, from Ibn ʿAbbās, from Muʿāwiyah, who said, ‘I trimmed the hair of the Messenger of Allah ﷺ at al-Marwah.’”
The point is that this incident can only be connected to the ʿumrah of al-Jiʿrānah. During the ʿumrah of Ḥudaybiyyah he never entered Mecca, for he was turned back, as previously explained. In the compensatory ʿumrah (ʿumrat al-qaḍāʾ) Abū Sufyān had not yet accepted Islam, and none of Mecca’s inhabitants remained in the city when the Messenger of Allah ﷺ entered; rather, they left and stayed away for the three days he ﷺ spent there. Concerning the ʿumrah that was combined with his Farewell Pilgrimage, he did not disengage from it at all, by unanimous agreement. It is therefore undeniable that the hair trimming Muʿāwiyah ibn Abī Sufyān—may Allah be pleased with him—performed for the Messenger of Allah ﷺ at al-Marwah took place during the ʿumrah of al-Jiʿrānah, just as we have stated. Allah knows best.
Muḥammad ibn Isḥāq (5) said—may Allah grant him mercy—: “The Messenger of Allah ﷺ then departed from al-Jiʿrānah in iḥrām for ʿumrah and ordered that the remaining spoils be held at Mujannah, near Marr al-Ẓahrān.”
I say: It appears that he ﷺ kept back part of the booty so that he might win over the Bedouins he would encounter between Mecca and Madinah.
Ibn Isḥāq (6) continues: “When the Messenger of Allah had completed his ʿumrah he returned toward Madinah, appointing ʿAttāb ibn Asīd as governor over Mecca and leaving Muʿādh ibn Jabal with him to teach the people their religion and the Qur’an.”
ʿUrwah and Mūsā ibn ʿUqbah (7) report that the Messenger of Allah ﷺ had left Muʿādh with ʿAttāb in Mecca before setting out for Hawāzin, and that he left the two of them there again when he returned to Madinah.