Hello, this does work. I used a slightly different version around some plums. Cannot claim this is my idea, I read it in a Bob Flowerdew book. You use a jamjar, with tin foil on top, pierce with a pencil in a couple of places. Keep the foil in place with an elastic band. The holes are big enough for the wasp to get in (I should think he climbs in) but they don't seem to get out. Inside I used some pouring syrup, water and a squashy fruit that had dropped off the tree which I bunged in as well on a whim.
It looks like it got mostly wasps and the odd fly, but no bees so far as I could tell.