Replacing the speaker instead of refoaming is usually a bad idea.
The new speaker has (unless identical from the same manufacturer with the same parameters) will have a different sound.
Every speaker has various parameters for impedence, proper enclosure size, rolloff..etc. no two different brand, model speakers are anywhere near the same!
Teh more I look at speakers and the idea of building my own it is really really hard to do. replacing a speaker in a loudspeaker cabinet is more than just getting the right size to fit the opening!
Replace the foam....