Phew, what a title. 
So, the normal situation is that when whipping for a wonder, you only get half the amount of hammers per population point compared to normal whipping. However, if you whip something else that is not a wonder, and keep the wonder next in queue, any overflow from the first build is added in full to the wonder. I claim that this is a bug, not a feature, since it enables some exploits.
EDIT: Here is a link to a thread where I detail an exploit enabled by this bug.
Steps to reproduce:

So, the normal situation is that when whipping for a wonder, you only get half the amount of hammers per population point compared to normal whipping. However, if you whip something else that is not a wonder, and keep the wonder next in queue, any overflow from the first build is added in full to the wonder. I claim that this is a bug, not a feature, since it enables some exploits.
EDIT: Here is a link to a thread where I detail an exploit enabled by this bug.
Steps to reproduce:
- Have the Slavery civic in place, and a town that could whip-complete what it is currently building (which is not a wonder).
- Queue up a wonder as the next build.
- Whip the first build to completion, then end your turn.
- On the next turn, look at the hammers that will be invested in the wonder to see that any overflow was added in full.