[This is] the way of Allah which has passed on before," meaning: by the killing of those who manifested polytheism; since the Prophet was commanded to fight.
Muhammad said: "The way of Allah" (Sunnat Allah) is in the accusative case (mansub) based on the implied meaning: Allah enacted a way (Sanna Allahu sunnatan).
Interpretation of Surat al-Fath from verse 24 to verse 26.
﴿سُنَّةَ اللَّهِ الَّتِي قَدْ خَلَتْ مِن قَبْلُ﴾ أَي: بقتل من أظهر الشّرك؛ إِذْ أَمر النَّبِي بِالْقِتَالِ.
قَالَ محمدٌ: ﴿سُنَّةَ اللَّهِ﴾ مَنْصُوب بِمَعْنى: سنّ اللَّه سنة.
تَفْسِير سُورَة الْفَتْح من الْآيَة ٢٤ إِلَى آيَة ٢٦.