The above interpretation of law is mine only and there has been a lot of discussions on the similar issue and some were saying that a woman is entitled to maternity benefits if she had worked at least for 80 days before delivery. This interpretation does not consider the wording in section 5(2) of the Act that, "No woman shall be entitled to maternity benefit unless she has actually worked ......... for a period of not less than eighty days in 'the twelve months' immediately preceding the
date of her expected delivery". The explanation for 80 days also states that, "For the purpose of calculating the days on which a woman has actually worked in the establishment (ie, the 80 days as mentioned above), the days for which she has been laid-off during the period of 'twelve months' immediately preceding the date of her expected delivery shall be taken into account".
The above views show that 12 months from joining and 80 days in that period are pre conditions for getting maternity benefits.
Firing an employee on the ground of pregnancy is anyway a very bad HR practice. For that you can approach the appropriate authority.
Labour laws are meant for persons who work for the employers. These laws protect the employees. But just on the ground that I have become an employee, the laws may not become a protective shield for me. It is seen that we people join an organisation just to avail leaves. The very purpose of becoming an employee is to know what are the rights and how to get it.
Your management can not fire you as they have confirmed you recently on ground of poor performance. You have to seek legal action if at all they are terminating you at this period of pregnancy.