Source: Fatawa Aman Puri by Sheikh Ghulam Mustafa Zahir Aman Puri
Question:
A woman does not perform her prayers properly and does not maintain a barrier of voice with non-mahram. Is it obligatory for the husband to divorce her?
Answer:
The husband should not divorce such a woman, but rather continue to advise her. Sayyidina Abu Huraira (may Allah be pleased with him) narrates that the Messenger of Allah (peace be upon him) said:
استوصوا بالنساء خيرا فإنهن خلقن من ضلع وإن أعوج شيء فى الضلع أعلاه فإن ذهبت تقيمه كسرته وإن تركته لم يزل أعوج فاستوصوا بالنساء خيرا
"Be extremely good to women, for they were created from a rib, and the most curved part of the rib is the upper rib. If you try to straighten it, you will break it, and if you leave it as it is, it will remain curved. Therefore, treat women with utmost kindness."
Reference: (Sahih Bukhari: 3331, Sahih Muslim: 1468)