Hymen repair for one who was divorced before consummation of the marriage
If the marriage contract is done, then the woman becomes a wife and it is permissible for the husband to do with her what all husbands do with their wives. But having intercourse should be delayed until the day of the consummation (wedding party), so as to avoid any negative consequences that may result from that.
With regard to engagement, that comes before the marriage contract, and it does not make it permissible to have intercourse, be alone with her or be intimate with her, rather when the man proposes marriage it becomes permissible for him to look at the one whom he wants to marry, but he is still a stranger to her like all other men, until the marriage contract is done.
Based on this, intercourse in the first case (when the marriage contract has been done) is permissible and there is no sin in that. But in the second case (engagement) it is zina.
With regard to repairing the hymen, it is not permissible in either case, because it is deceit and it is a deception of the second husband as it will make him think that his wife is a virgin, when in fact she is not. Having this operation also means that the doctor will look at the most private part of the ‘awrah when that is not necessary.
In addition to that, if the hymen was torn due to zina, then the operation to repair it will be helping in something haraam and making it easy.
And Allaah knows best.