Whenever the county commissioners of any county have heretofore or shall hereafter purchase any real property at any county treasurer's sale for nonpayment of taxes under any act of Assembly authorizing such sale, and such property has not been redeemed or sold by the county as authorized by law, the county commissioners, subject to the approval of the court of common pleas, may, whether or not the period of redemption has expired, agree with the former owner of such property, or his heirs, devisees, or anyone, or more of them, to accept, in compromise of the amount of the taxes, penalties, interest and costs due, any sum less than the whole of such amount so due, whereupon either the county commissioners or the person with whom such agreement is made may petition the court of common pleas for confirmation of such agreement.
72 P.S. § 5876