No person shall be entitled to prosecute such writ who shall have been committed or detained by virtue of the final judgment or order of any competent tribunal of civil or criminal jurisdiction or by virtue of any execution issued upon such order or judgment; but no order of commitment for any alleged contempt or upon proceedings as for contempt to enforce the rights or remedies of any party shall be deemed a judgment or order within the meaning of this section; nor shall any attachment or other process issued upon any such order be deemed an execution within the meaning of this section.
Wis. Stat. § 782.02