JuniYadi Posted September 19, 2019 Share Posted September 19, 2019 Hi, so i'm reading in here https://developers.whmcs.com/hooks/module-hooks/ In hooks.php file addons : Hook files are only detected at the time a module is activated and configured. If you add your hook file after the module has already been activated, you may need to deactivate and reactivate your module in order for WHMCS to recognise it. any recomendation tricks to load hooks.php directly in addons without deactive? Since if deactive and actived again, it's need reconfigure with the database. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted September 20, 2019 Share Posted September 20, 2019 (edited) SELECT value FROM tblconfiguration WHERE setting = 'AddonModulesHooks' LIMIT 1 It will return a comma separated list of addon modules that use action hooks: SexyModule,FindYourWallet,AnotherSexyModule,ModuleAboutAffiliations,ModuleAboutBillingStuff Let's say that your module is named JuniYadi. As you can see it's not listed in the above string that's why your hook.php is ignored. All you need to do is the following: SexyModule,FindYourWallet,AnotherSexyModule,ModuleAboutAffiliations,ModuleAboutBillingStuff,JuniYadi Important: you have to be very careful when you play with this string because you could break other modules. For example imagine what happens if you end up with this string: ModuleAboutAffiliations,ModuleAboutBillingStuff,JuniYadi 3 modules are missing and can no longer run their action hooks. And what about this? JuniYadi For sure your module will work but your customer will kill you for breaking his WHMCS. Edited September 20, 2019 by Kian 1 Quote Link to comment Share on other sites More sharing options...
JuniYadi Posted September 21, 2019 Author Share Posted September 21, 2019 Thanks @Kian, it's works perfectly. 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.