Green’s Dictionary of Slang

wig n.1

[wig v.2 ]

1. [late 18C–1900s] a severe scolding, a telling-off.

2. [late 18C+] a dignitary, lit. one who wears a wig for professional reasons, usu. a judge or barrister.