Question
A man put on socks without performing wudu, and afterwards he continued to pray after wiping over them. Then he remembered that he had not performed wudu. Will he have to repeat the prayers he has prayed?
Answer
If a person put on socks without performing wudu, and afterwards continued to pray after wiping over them, then his wudu and his prayer are not valid, because the condition for wiping is that the socks or leather socks be put on while in a state of wudu. This person must repeat the prayers he has prayed, because those prayers were performed without a valid wudu.
As for the hadith you mentioned, that the Messenger of Allah ﷺ took off his shoes during the prayer and the Companions did the same, that hadith relates to the issue of impurity, not to the issue of wudu. If wudu was not performed, or the conditions of wudu were not fulfilled, the prayer is not valid. Therefore this person will have to repeat his prayers.
Summary:
If a person puts on socks without wudu, wipes over them and prays, his prayer is not valid and he will have to perform his prayers again.
And Allah knows best.