Invoke the command hook when calling commands