The "Jackass" star's lawyer, Michael T. van der Veen, tells TMZ it was a court victory for Bam Wednesday ... adding he's on the right track to reclaiming his successful career and his wonderful life with his wife, Dannii Marie, once he wraps up his short-term treatment.
Sources tell us Bam's going directly to Recovery Centers of America for Inpatient Treatment, and his case can officially be closed once his treatment is over -- but a bench warrant will be issued if any noncompliance with his treatment is reported.