Corden thought it was “a beautiful song” and had lined it up for Hartland to sing, he said in new book When Gavin Met Stacey And Everything In Between.
“In terms of getting permission to use the song, the BBC have a licensing agreement which is great for UK transmissions of music,” he said.
“But I think The Beatles sit outside of that, which we didn’t know, and it’s so expensive if you want to use one of their songs.”
With the sitcom’s budget not covering the cost of paying for the track, Corden wrote to McCartney asking permission to use it.
He said: “I wrote just telling him that I felt this was a pivotal moment in the show and that I would never request anything if I thought it was going to be in any way derogatory.”
He added that he wasn’t sure of the details but believes McCartney waived involvement which meant the programme could afford it.
“He said in his email that he was so touched and honoured, and he would love nothing more than this to happen, and they’d do everything in their power to make sure it could, and then, within 20 hours, it was done, and we had clearance to use the song,” Corden said.