Whenever a decree of divorce is granted, the trial court may, in its discretion or upon the application of either party by the terms of the decree, restore to the woman her maiden name or the name she legally bore prior to her marriage to the husband in the divorce suit. All decrees of divorce previously entered restoring to the divorced woman her former name under this section are declared legal and valid and effective from their date of entry.
SDCL 25-4-47