The behavioural responses of parasitic wasps to chemical cues from their hosts and host plants are known to be affected by genetic and environmental components. In a previous study of the codling moth ectoparasitoid Hyssopus pallidus, we found that the response of adult parasitoids to the frass of their host caterpillars depended on a learning process involving plant cues. In the present study, we investigated how and when learning takes place. A series of experiments was conducted involving exposure of parasitoids to fruit cues at different developmental stages. While parasitoids were not able to learn the fruit cues in the adult stage, exposure to fruit odour at early preimaginal stages significantly increased the adult response to frass from fruit–fed caterpillars. The olfactory memory persisted through metamorphosis, with a retention time of 14 days. Preimaginal learning was not confined to fruit cues but was also demonstrated for a host– and fruit–independent cue, menthol. Parasitoids exposed to menthol odour at the egg and larval stages no longer showed negative responses as adults. Sensitization to fruit cues and habituation to menthol are considered to be the mechanisms involved. This study provides evidence of true preimaginal learning of olfactory cues in a parasitic wasp.