One of the more relevant aspects to improve the two-stage microinverter architecture consists on reduce the size of the required decoupling capacitor in order to enable the use of technologies with a greater service life such as thin-film capacitors. However, the diminution of the capacitor size introduces a deterioration of the power quality level at the grid side because the ripple component of the DC-link voltage accentuates on the current control loop. This paper models the effect of the ripple component of the DC-link voltage of a sliding-mode controlled two-stage solar microinverter and proposes a feed-forward compensation method reducing the Total Harmonic Distortion (THD) of the output current. The proposed approach estimates and cancels the double grid frequency component of the DC-link voltage measurement. The effectiveness of the proposed method is validated using several simulation results and comparisons.