The unemployed youth was arrested, and claimed to have no memory of the violent incident.
At Christchurch District Court he earlier admitted charges of assault, demanding money with intent to steal it, theft, and shoplifting.
It has since become clear that he is a habitual user of synthetic cannabis.
But there has been difficulty getting him into a rehabilitation programme while he was still using the herbal highs, the court heard today.
The only remedy that Judge David Saunders saw was to jail him for six months and give him a chance to go clean.
Defence counsel Carol Morgan said Wheble was a "likeable" young man who had the support of his family, and "wants to tackle his drug use".
Judge Saunders says legal highs are causing "immense harm" to young men and women, causing them to act in "violent and bizarre" ways.
He ordered the short term of imprisonment, recommending he serve it at the youth unit at Christchurch prison which would be a "far better therapeutic environment" for someone he saw as a "vulnerable youth". He said he'd be out in three months.
The judge imposed nine months of special release conditions that required Wheble to undertake treatment for his drug dependency.
He thanked the youth's parents for their support, saying it was critical in turning his life around.
As the boy's mother left court, she told the judge: "They need to outlaw that herbal stuff."