Hats are accessories in Plants vs. Zombies: Garden Warfare and Plants vs. Zombies: Garden Warfare 2. In both games, hats are purchased with coins via the Sticker Shop. The player can apply them to their respective characters using the customization menu. In Plants vs. Zombies: Garden Warfare 2, there is a new kind of hat avalible, which are the legendary hats. One example is the Everlasting Crown.
Plants vs. Zombies Wiki has a gallery for Hats (PvZ: GW).