The problem is that at this point, flycheck-mode might not be active yet. Calling flycheck-disable-checker always call (flycheck-buffer) which would result in an error: (user-error "Flycheck mode disabled")