A related question about where/when to show if free shipping is available might be instructive in this case.
As with my answer to that question, it comes down to giving the user as many compelling incentives that will bring them to a "buy" decision.
For this reason, allowing a user to see how much benefit their voucher code would give them BEFORE they make their "buy" decision would maximize the benefits of having the voucher in the first place.
If a user is on the fence, and they are not sure if they want to go through the hassle of creating an account, knowing that they get a reward (savings) if they do might be the motivation they need to take action.
If you do not allow them to enter the voucher, or at least see what the voucher gets them, until they are at the last step of the workflow, they have already made their decision so the potential of the voucher is not maximized because you are incentivizing users to do something they have already decided to do.
While one could argue that if you have the voucher at the end, it will incentivize repeat sales, I would counter that having the voucher earlier in the workflow will still achieve that effect while also incentivizing first time customers.
TLDR; A voucher is a compelling motivator to help a customer reach a "buy" decision, so show it to them early without making them "commit" to your site by creating an account or "checking out".