Peter Pan is a character that only appears in the first Shrek film. He was mistaken for in Shrek The Third.
In Shrek, Peter is seen waiting in line to sell Tinkerbell to Lord Farquaad's army. When Tinkerbell inadvertently sprinkles fairy dust on Donkey, Peter cries "He can fly!".
When the villains enter Far Far Away, Captain Hook stops by a local boy, mistaking him for Peter Pan. When a girl corrects the pirate, he responds, "Shut it, Wendy!".
In the video game, Shrek the Third, it is implied that Captain Hook killed Peter. Though, if the games have any canon with the films, Hook is not surprised when he mistakes a boy for Peter Pan in the film upon which the video game was based.