Allow user to specify when hooks should be disabled