A 37-year-old man has been jailed over a violent rampage at Hungry Jacks in Baldivis.
The man abused staff and threw drinks and other items at them on Wednesday morning before assaulting a teenage boy inside the store.
He then attacked an elderly traffic warden outside the fast-food restaurant.
The 81-year-old man was pushed to the ground and kicked.
He was taken to Rockingham Hospital for treatment and is now recovering at home.
Members of the public stepped in to detain the accused before he was arrested by police.
Speaking on 7NEWS, witness Chelsea Lilley said the man became angry over a drink.
"It was all over a vanilla mocha that wasn't 'vanillary' enough," she said.
The Gosnells man was charged with assaulting a public officer, unlawful wounding, making a threat to unlawfully do an act, common assault, criminal damage and failing to give police personal details.
He appeared before the Rockingham Magistrates Court on Thursday where he pleaded guilty to the offences.
The man was sentenced to one year and nine months behind bars.
Kwinana Police seek whereabouts of Andrew Mulder
Golden Bay woman fronts court after allegedly lacing colleague's curry with snail pellets
Wanted man known to frequent Halls Head area
Man arrested after attacking child, elderly traffic warden in Baldivis
Mandurah land owners reminded to prepare properties ahead of bushfire season
Ten high-rise apartment towers set for Rockingham
Safety Bay man accused of child sex offences back behind bars after allegedly breaching bail conditions
Daytime case management services now on offer to Rockingham homeless
Police hunt group of 13 masked teens who stormed Baldivis bottle shop