When to Resume Prayer and Fasting after Abortion
Question

Someone has just had an abortion, is it permissible for her to fast or does she have to wait a certain period of time?
Praise be to Allah.When is the bleeding following an abortion regarded as Nifas?
It is not permissible for a woman who is bleeding following childbirth to fast , and her fast is not valid. She has to make up the days that she missed because of Nifas (postpartum bleeding). 
Nifas is the blood passed by a woman because of childbirth. 
But if a woman miscarries (or has an abortion), the blood that she passes is not considered to be Nifas unless the foetus has human features. 
Human features do not appear in the foetus before eighty days of pregnancy, because the Prophet (peace and blessings of Allah be upon him) said: “The creation of any one of you is put together in his mother’s womb for forty days, then he becomes a `Alaqah (a piece of thick coagulated blood) for a similar period, then he becomes like a chewed piece of flesh for a similar period, then Allah sends an angel who is enjoined to write down four things, and it is said to him: `Write down his deeds, his provision, his lifespan and whether he is doomed for Hell or destined for Paradise. Then the soul is breathed into him.” (Narrated by Al-Bukhari, 3208)
This Hadith indicates that a human being goes through a number of stages during pregnancy. 
For forty days he is a Nutfah (mixed drops of male and female sexual discharge), for the next forty days he is a `Alaqah (a piece of thick coagulated blood), then for forty days he is a Mudghah (a lump of chewed flesh), then the soul is breathed into him after one hundred and twenty days have passed.  
Human features begin to appear at the Mudghah stage, not before that, because Allah says (interpretation of the meaning): 
“O mankind! If you are in doubt about the Resurrection, then verily, We have created you (i.e. Adam) from dust, then from a Nutfah (mixed drops of male and female sexual discharge, i.e. the offspring of Adam), then from a clot (a piece of thick coagulated blood) then from a little lump of flesh — some formed and some unformed (as in the case of miscarriage) — that We may make (it) clear to you (i.e. to show you Our Power and Ability to do what We will).” [Al-Hajj 22:5]
Allah described the Mudghah as being formed and unformed.  What is meant by formed is that there appears on the embryo traces of how the body will look, such as the head, limbs, etc.  
When to resume prayer and fasting after abortion
If this woman had an abortion, if that happened before eighty days of pregnancy, then the blood she passes is not the blood of Nifas, rather it is Istihadah (non-menstrual bleeding) which does not stop her from praying and fasting, but she has to do Wudu for each prayer. 
If the abortion took place after the soul was breathed into the foetus – i.e., after one hundred and twenty days of pregnancy – then the blood is definitely Nifas. 
If the abortion took place between eighty and one hundred and twenty days, then the embryo should be examined. If it has human features then the blood is Nifas, and if it does not then the blood is Istihadah . 
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said in his essay Ad-Dima’ At-Tabi`iyyah lin-Nisa’ (The Natural Blood of Women), p. 40: 
“Nifas is not established unless the embryo expelled has human features. If she expels a small embryo that has no human features then her bleeding is not Nifas, rather it is bleeding from a vein, so it comes under the same ruling as Istihadah. The earliest at which human features may appear is eighty days from the beginning of pregnancy, but it usually happens at ninety days.” 
The woman in Nifas has to stop praying and fasting until she becomes pure. When the bleeding stops and she becomes pure, she should do Ghusl and pray and fast. If the bleeding lasts for more than forty days , if the additional bleeding coincides with her usual menstrual cycle then it is Hayd (menstruation); if it does not coincide with her usual cycle then it is Istihadah, so she should do Ghusl and pray and fast, and do everything that women who are pure do. 
 And Allah knows best.