What is a pig in a poke?
In olden days, a poke was a bag. A small poke, or pocket often dangled from the belt full of precious possessions. Nowadays, we sew these small pokes to our garments and call them pockets.
Also, in days gone by, it was usual for the farmer to take his produce to market in pokes. Many a squealing young pig was jogged to market in a poke. From there on it was up to the farmer to get the best price for the pig in the poke and up to the buyer to make sure that the pig was a pig and not a squawling cat.
So the saying grew. No smart person would buy a pig in a poke without careful inspection. No smart person buys a bargain without first making sure that it is a bargain and not a squawling cats