After that, you want to find the ID's of the hats/miscs you're looking to wear; so, go to your TF2 Installation folder (mine's at: C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2) and then enter the /tf/scripts/items folder. You're going to see an items_game.txt file.You may want to open that with a different notepad program, I use NotePad++. After opening the file with your desired notepad, you may see a lot of text inside it. Press CTRL + F and input your desired misc/hat name. I'll be using the Head Prize hat as example.

You will have to press Find Next, a few times before reaching the hat/misc ID. It only took 2 clicks for me. the ID will look something like this;

So, copy that and go in-game, and while being in a WonderLand server, type in chat: !wear idofyourhat, so in my case, it'll be !wear 30838. (You can use the commands !wear, !wear2, !wear3 to make use of all the 3 cosmetic slots!)

Then you'll be greeted with this message;

As the message tells you, go touch a resupply locker to apply the wear item, if you're in a server with no resupply locker, you will have to wait until the next round starts.