(815 ILCS 604/10)
    Sec. 10. Attorney's fees. If a consumer contract allows for the recovery of attorney's fees in an action brought by a commercial party to enforce the consumer contract, the court may award reasonable attorney's fees to the defendant if the defendant prevails in the action. A defendant prevails in an action if:
        (1) judgment is entered by the court in favor of the
    
defendant;
        (2) a motion to dismiss the case is filed by the
    
defendant under Section 2-619 of the Code of Civil Procedure and is granted by the court; or
        (3) the plaintiff voluntarily dismisses the pending
    
case under Section 2-1009 of the Code of Civil Procedure after a trial date has been set and after the pending case has been previously filed on the same consumer contract and dismissed under Section 2-1009 of the Code of Civil Procedure.
(Source: P.A. 103-344, eff. 1-1-24.)