The attorney in an action or special proceeding, may be changed at any time before judgment or final determination as follows:
(1) Upon his or her own consent, filed with the clerk or entered upon the minutes; or
(2) Upon the order of the court, or a judge thereof, on the application of the client, or for other sufficient cause; but no such change can be made until the charges of such attorney have been paid by the party asking such change to be made.