All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
The scholars held different views regarding the obligation of mentioning the name of Allaah over the slaughtered animal at the time of slaughtering. The Shaafiʻis held that it is not obligatory. Based on their scholarly view, this hen is halaal (lawful) to eat. The majority of the scholars, on the other hand, held that it is obligatory to mention the name of Allaah at the time of slaughtering. They held different views, though, about saying “Alhamdulillaah” (praise be to Allaah), for instance, instead of “Bismillaah” (in the name of Allaah) at the time of slaughtering and whether it is sufficient in this regard or not. Ibn Qudaamah wrote:
“If this view (the obligation to mention Allaah) is established, then Allaah must be mentioned by saying ‘Bismillaah’ in particular. That is because mentioning Allaah is meant to say that in the first place. It is authentic that the Messenger of Allaah used to say 'Bismillaah wa Allaahu Akbar' when slaughtering. Also, Ibn 'Umar used to say that. However, it is sufficient to say only 'Bismillaah'. If the person says ‘O Allaah, forgive me’ instead at the time of slaughtering, it is not sufficient because this is a supplication. If he says ‘La illaha illa Allaah’ or ‘Subhaanallaah’ or ‘Allaahu Akbar’ or ‘Al-Hamdulillaah’ at the time of slaughtering, it may be sufficient because this is a form of mentioning the name of Allaah by glorifying Him, and it may also be insufficient because he did not say Bismillaah.” [Al-Mughni]
Hence, it is lawful to eat this hen that was slaughtered while saying ‘Alhamdulillaah’ at the time of slaughtering according to the Shaafiʻis and some of the scholars who held that it is obligatory to mention the name of Allaah at the time of slaughtering based on their view that the phrase ‘Alhamdulillaah’ is a mention of Allaah. However, it is unlawful to eat it according to the other scholarly view (that it is an obligation to say ‘Bismillaah’ in particular.).
Finally, there is no harm in following the first view, which holds that it is lawful to eat this hen.
Allaah knows best.