The walrus was Paul.
Looking through a glass onion? The Beatles used the image of a glass onion to describe their distain for the conspiracies about them. The song references earlier lyrics from Lady Madonna to Fool on the Hill to I am the Walrus. At the time, people were speculating about Paul’s death and the meaning of playing the Sgt. Pepper album backwards to reveal obscure clues. But there’s another reason that the onion itself is so apropos of death, mythology, and revealing the hidden plane.
Going back to ancient Egypt, onions were symbols of eternity. They were eaten in both ordinary meals and ceremonial feasts. Flowering onions were found placed on mummies chests, and onions have been found attached to the soles of the feet and along the legs. King Ramses IV, who died in 1160 BC, was entombed with onions in his eye sockets. The onion represented something powerful to the ancient Egyptians, without question.
But the earliest domestication of the onion is nothing but speculation and rumor. They were known to have grown wild in many regions, and thus they were domesticated in many places nearly simultaneously. Onions are referenced in the earliest Vedic texts as well as the early Sumerian records and beyond.
And according to Urban Dictionary, “the term [glass onion] was believed to mean a glass-lidded coffin by the followers of the Paul is Dead conspiracy. The real meaning of the song is that people were over-analyzing the Beatles' lyrics. A glass onion is something that would have layer after layer peeled away, only to realise that it was transparent all along.”