The idiom dictionary currently has this definition for "when pigs fly".
When pigs flyThat could be shortened to,
Meaning you will not get something when you want it or someone doesn't want something for you. say you are selling an item and some one doesn't want it. they might say 'I'll buy it when pigs fly'. it just means you will never get someone to say yes to you when you ask for something.
When pigs fly
It will happen "when pigs fly". Pigs do not fly, so it will never happen. Usually it means it will be prevented from happening, that it is politically impossible, at least for many decades.
The current definition is close, but the way I read it, it leaves open the possibility that you might get it, just not when you want it. But in North America, in my experience, "when pigs fly" always means the speaker thinks it will never ever happen, at least not for many decades.