Thank you for this helpful response.
I’m having the same issue.
Can you give a bit more information about overriding the function?
I tried removing the function entirely. But this stopped the blog from loading, and I had to restore from a backup. So clearly I was doing it wrong.
(Apologies, I don’t have much PHP knowledge.)
Thanks again.