Hello mickymole, welcome to the forum. Let's see if we can get your wife's bike performing well again. Several suggestions.
First, you may be able to re-cell the battery yourself in the same way as for the Giant Lafee bikes, using a Powacycle battery and taking the pack from that. It's option 3 on the following page of one of my sites:
Recelling the Lafree battery
If you don't want to do that yourself, next is the option of a recelling service. Two I'd suggest are
Cellpack Solutions and
Vita Electric.
Should those not be able to do it for any reason, the next option is the
Electric Bike Centre, since they are familiar with the Yamaha XP26 and can supply spares for it, so should be able to assist you.
I hope one of those provides a solution.
.