craigedmonds Posted September 12, 2016 Share Posted September 12, 2016 All I want to do is run a hook when I change the package for a client. Documentation says "Runs after the ChangePackage function has been successfully run." The documentation does not actually include any information on ChangePackage. Trying to run this. add_hook("ChangePackage",1,"cab_spain_update_package_details_in_wordpress"); DOES NOTHING. PLease help me as I am getting a bit pissed off with this. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 13, 2016 Share Posted September 13, 2016 please include further information: 1. where your ActionHook file is saved? 2. is it possible to include the whole code to check? 3. I can see space in function name "packa ge" where this isn't valid, you may need to fix this and try. 0 Quote Link to comment Share on other sites More sharing options...
craigedmonds Posted September 13, 2016 Author Share Posted September 13, 2016 (edited) please include further information:1. where your ActionHook file is saved? 2. is it possible to include the whole code to check? 3. I can see space in function name "packa ge" where this isn't valid, you may need to fix this and try. Thanks for replying. I have it working now becasue the actual name of the hook is called "ServiceEdit", however I now need to run the same hook when the product is added to the clients account, but in the documentation its not really clear what the name of the hook should be. I have managed to figure out that to run the hook when the service is deleted from the clients account is "ServiceDelete" so logic would suggest to me that when a service is added or created it should be "ServiceCreated" or "ServiceAdded"...but no. Edited September 13, 2016 by craigedmonds 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 13, 2016 Share Posted September 13, 2016 ServiceCreated = http://docs.whmcs.com/Hooks:PreModuleCreate and/or http://docs.whmcs.com/Hooks:AfterModuleCreate also ServiceDeleted = http://docs.whmcs.com/Hooks:PreModuleTerminate or http://docs.whmcs.com/Hooks:AfterModuleTerminate 0 Quote Link to comment Share on other sites More sharing options...
craigedmonds Posted September 14, 2016 Author Share Posted September 14, 2016 ServiceCreated = http://docs.whmcs.com/Hooks:PreModuleCreate and/or http://docs.whmcs.com/Hooks:AfterModuleCreatealso ServiceDeleted = http://docs.whmcs.com/Hooks:PreModuleTerminate or http://docs.whmcs.com/Hooks:AfterModuleTerminate Ah ok. Now it makes sense. The documentation is not 100% clear. I think I get it now. Thank you very much for your help. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.