David Wheeler scored a 90th minute winner against his former club to secure all three points for the Chairboys in a five-goal thriller with Milton Keynes Dons at Adams Park.
Joe Jacobson opened the scoring from the penalty spot after Jordan Houghton tripped Paul Smyth in the box, but Jordan Bowery levelled matters soon after, sweeping home from six yards.
Fred Onyedinma restored Wanderers' advantage at the end of a fine breakaway goal, started by Dominic Gape before Alex Samuel fed the ball into his fellow striker's path.
Gareth Ainsworth introduced Nick Freeman, Adebayo Akinfenwa and David Wheeler from the bench in a bid to win the game, and after Akinfenwa missed a golden chance to make it 3-2, Freeman and Wheeler combined for the winning goal, with the latter controlling an inch-perfect cross before drilling past Lee Nicholls.