Amr bin Shu'aib (may Allah be pleased with him) narrated from the Prophet (ﷺ) that he (ﷺ) said: "The hand is not to be cut for (stealing) hanging fruit. However, when it is gathered in the threshing floor (an open place), then the hand is to be cut for it."
Hadith Referenceمسند الإمام الشافعي / كتاب الحدود / 1595
Hadith Takhrijاخرجه ابوداود، اللقطعة، باب التعريف باللقطة (1710)، (1711)، (1390) - وابن ماجة، الحدود، باب من سرق من الحرز (2596) والنسائي قطع السارق الثمر يسرق بعد أن يؤويه الجرين (4961) وصححه ابن الجارود (827) - والحاكم : (381/4)۔