The woman was pregnant and it was learnt after divorce then her iddah shall be over after birth. After that the gap between the nikah and child birth shall be observed. If the child was born after six month from the nikah or more than it then the child shall be considered legitimate and the husband should consider him his child, but if the child was born before six months then it shall be considered illegitimate.
Allah knows Best!
Darul Uloom Deoband