Hidden defects العيوب الباطنة
The Maliki school clarifies this important point in the relationship between seller and buyer.
If a person buys goods whose hidden defect or flaws can only be discovered by altering the goods themselves (for example a watermelon, or wood that contains internal problems which can only be revealed by breaking it), then in such cases the buyer may not return the goods to their owner, nor demand a refund or compensation, unless this was stipulated in the contract, or unless the custom and practice in the market in question was to return the goods for this reason.
However, where the hidden defect can be revealed and known without altering (or changing the condition of) the goods in question, as with eggs (one can tell that an egg is rotten simply by moving it, or from outward signs), then in such cases, if the defect is such as to prevent the use of the goods and deprive them of all interest and value, the seller must refund the buyer (who returns the goods), whether the seller acted in good faith or was a concealer (mudallis).
If the (hidden) defect in the goods is not such as to make them unusable and the seller was not a concealer: if the buyer became aware of the defect before using the goods (and thus altering them), the buyer may choose between keeping the goods or returning them, without owing or claiming anything. If, on the other hand, the buyer uses the goods and only then becomes aware of the defect, the buyer may choose either to return them and pay for the part that was used, or to keep them and be compensated by the seller for the defective part (the difference (proportion) between the price of the same goods in sound condition and these defective goods). If the seller was a concealer (a cheat), the buyer has the right either to keep the goods, in which case they receive nothing (by way of compensation), or to return the goods and be refunded in full.
Taking the example of eggs (for simplicity), if a long period has passed before the buyer (actually uses the goods) and reports the defect, the buyer will be entitled neither to compensation (nor to a refund), since it will not be possible to tell whether the defect is the seller’s responsibility (arose while in the seller’s hands) or whether it lies with the buyer.
On this point, see the view of the four Sunni schools in:
Al-Fiqh ‘ala al-madhahib al-arba’a by Al-Jaziri, volume III, book of sales.

