In Drosophila melanogaster, male mating drive is determined by the integration of internal state of the animal and environmental stimuli. One critical node of integration is Or47b olfactory receptor neurons, the response of which to aphrodisiac pheromones is regulated by a hormone that signals flies' fertility state. However, it remains unclear whether the impact of Or47b input is also affected by contextual external cues. Here we perform series of behavioral assays to investigate the influence of food odor, female age, size of courtship chamber and light on the outcome of courtship competition between wild type and Or47b mutant males. We find that the copulation advantage of wild type over Or47b mutant males persists in all tested conditions, despite the concomitant differences in total copulation rates. Together, these results indicate that Or47b input remains a key determinant of courtship decision in varying environments, thereby highlighting its importance in the neural circuitry controlling male mating behavior.