BAYHAQI 14181:
from ʿAlī b. Abū Ṭālib —
[Machine] The Messenger of Allah ﷺ forbade temporary marriage, He said: "It was only allowed for those who could not find (permanent marriage). But when the rules of marriage, divorce, waiting period, and inheritance were revealed, temporary marriage was abrogated."
البيهقي ١٤١٨١:
عن علي بن ابو طالب —
نَهَى رَسُولُ اللهِ ﷺ عَنِ الْمُتْعَةِ قَالَ وَإِنَّمَا كَانَتْ لِمَنْ لَمْ يَجِدْ فَلَمَّا أُنْزِلَ النِّكَاحُ وَالطَّلَاقُ وَالْعِدَّةُ وَالْمِيرَاثُ بَيْنَ الزَّوْجِ وَالْمَرْأَةِ نُسِخَتْ
hadithunlocked.com