All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
If the pig fat is treated until it is totally transformed to another substance and it is then added to the liquid that you mentioned in the question, then, according to the preponderant view of the scholars, it becomes permissible to use because its transformation renders it pure .
Ibn al-Qayyim said in A’laam al-Muwaqqi’een, “It is impossible for the ruling on impurity to remain when the name and character of the (impure) thing have changed. The ruling is connected to the name and character and is present or absent depending on whether they are present or absent. The texts that apply to the prohibition of dead meat, blood, pork and alcohol do not apply to crops, fruits, ash, salt, or vinegar, whether in wording or meaning or text or analogy.”
However, if the pig fat is put in that liquid before its change (i.e. before it is transformed), then it is impure, and if clothes are washed with it, it does render them impure.
If this is the case, then you must avoid using this liquid for washing the garment in which you perform the prayer because it renders it impure. It is known that the prayer is not valid in an impure garment while one is aware of that and able to change it. [i.e. to perform the prayer with another garment].
As regards your previous prayers [in that garment], then, according to the view of some scholars, you are not obliged to repeat them if you were unaware that the liquid was impure at that time.
Shaykh Ibn ‘Uthaymeen said in regard to someone who prayed with impure clothes [or clothes stained with impurity] while he did not know that, “He does not have to repeat the prayer regardless of whether he had forgotten it (that there was impurity on the garment), forgot to wash it, was unaware that he was stained with it, was unaware that it is an impurity, was unaware of its ruling, or did not know whether it happened (the impurity stained him) before the prayer or after the prayer.”
Also, the Fatwa in Noor ‘ala Ad-Darb reads, “If a person prays with an impurity [whether on his body or clothes] while he does not know that, then he does not have to repeat it; the same ruling applies to someone who does not know its ruling...”
Allaah knows best.