I think it depends what you mean by 'taken off the bonus scheme'.
If there is a bonus scheme attached to your job, and your remuneration is partly composed of normal salary and partly composed of a bonus (usually calculated by individual performance sometimes combined with organisational performance), then you will be entitled to the appropriate proportion of your bonus relative to the time you spend at work (plus the two weeks compulsory maternity leave).
So if there are 52 weeks in a bonus year, and you spend 26 of them on maternity leave, if you would have got a bonus of, say, £2,500 by being at work the whole year, you'd get a proportion of that to reflect 28 weeks. (The 26 weeks you were working plus two weeks compulsory maternity leave). So in that instance your bonus would be £2,500 divided by 52 x 28 = £1,346.
On the other hand, if there is a genuinely completely discretionary bonus, which is not part of your normal remuneration, you should get the whole thing whilst on maternity leave. An example would be if the company decides to give everyone a discretionary bonus of a week's pay, or a set amount of £250 at Christmas. Just to be nice, rather than because anyone's entitled to it. In those circumstances, if you are on maternity leave you can't lose out so should get the same as everyone else.
If there is a 'bonus scheme', it sounds as though the first scenario applies to you OP, so you should get a bonus proportional to the time you spent at work in the relevant years, plus the two weeks compulsory mat leave.