fix(hook): update hook constraint and usage (fixes #4492)