It makes a big difference to the sound - more difference with higher gain.
With the wah first, you get a much less "in your face" effect; the distortion will bring the frequencies that the wah is cutting back up.
With distortion first, you'll hear the full effect of the wah - it's much more pronounced.
Most people seem to prefer wah first (or wah between two overdrives), but you'll have to try both and see what you prefer.