Is the code hit if you add it into the other class which is working? I would also recommend using a separate assembly as recommended in the documentation. And make sure you are using this custom class on the app where given action takes place. Admin vs. front end app.