Prevent short codes running with no cart class loaded. Closes #4962