Refined theory of two‐photon processes accounting for virtual electric quadrupole and magnetic dipole transitions