Command him to take her back, then divorce her when she is pure or she is pregnant.

Sahih Muslim Book 18 Hadith 8

Sahih Muslim #1471 h

The Book of Divorce 18:8

Ibn 'Umar (Allah be pleased with them) reported that he divorced his wife while she was in the state of menses. 'Umar (Allah be pleased with him) made mention of it to Allah's Apostle (ﷺ) and he said:

Command him to take her back, then divorce her when she is pure or she is pregnant.

Chapter: The prohibition of divorcing a menstruating woman without her consent; If a man breaks this rule, it still counts as a divorce, and he should be ordered to take her back

Grade: Sahih