Hook code not working

Having the same problem with a very simple example.