We have conducted a theoretical study of harmonic generation from a silver grating having slits filled with GaAs. By working in the enhanced transmission regime, and by exploiting phase-locking between the pump and its harmonics, we guarantee strong field localization and enhanced harmonic generation under conditions of high absorption at visible and UV wavelengths. Silver is treated using the hydrodynamic model, which includes Coulomb and Lorentz forces, convection, electron gas pressure, plus bulk X(3) contributions. For GaAs we use nonlinear Lorentz oscillators, with characteristic X(2) and X(3) and nonlinear sources that arise from symmetry breaking and Lorentz forces. We find that: (i) electron pressure in the metal contributes to linear and nonlinear processes by shifting/reshaping the band structure; (ii) TEand TM-polarized harmonics can be generated efficiently; (iii) the X(2) tensor of GaAs couples TE- and TM-polarized harmonics that create phase-locked pump photons having polarization orthogonal compared to incident pump photons; (iv) Fabry-Perot resonances yield more efficient harmonic generation compared to plasmonic transmission peaks, where most of the light propagates along external metal surfaces with little penetration inside its volume. We predict conversion efficiencies that range from 10-6 for second harmonic generation to 10-3 for the third harmonic signal, when pump power is 2GW/cm2.