A workaround for this could be creating a command like /changehairstyle [name] after attaching (right-clicking it and using it and then a prompt would popup, asking you to name it) the hair to the command, i.e (/changehairstyle [wavy(1-xx)/straight(1-xx)/curly(1-xx)/longbob1/whatever name you want to name it], with a long cooldown on it between every use to prevent spam/abuse.
And for people who wants to roleplay using a wig AFTER BUYING IT, they buy it and right-click it from their inventory and click on 'Use', if they want to drop it, they can /dropwig (These are all commands suggestions). I think that if someone got their head shaved by another player, the system shouldn't let them have actual hair from the barber for a period of time and only allow wigs to be used for the user for a few gamewise time days because some people get their head shaved and then go to a barber and roleplay having their hair grown back like after an hour.