TMZ broke the story ... Scantlin was charged with felony coke possession back in April following his January arrest in L.A. Scantlin was also charged with two misdemeanors -- being under the influence of a controlled substance and driving without a license.
But Scantlin struck a deal with prosecutors that will keep him out of the pokey -- agreeing to plead guilty to the possession charge. The two misdemeanors were dropped.
In exchange for the guilty plea, Scantlin was sentenced to complete a drug counseling program.
He must show proof of enrollment by August -- and if he screws up, he could be sent to jail.