twister Posted September 8, 2021 Share Posted September 8, 2021 Hi guys, after a package is set to active i need to insert for that user some data in DB using mysql. i assume its hook after module create but dont know for sure. Can you assist ? Its not much documentation on it. 0 Quote Link to comment Share on other sites More sharing options...
PapaKai Posted September 8, 2021 Share Posted September 8, 2021 Hook Index where all hooks are documented: https://developers.whmcs.com/hooks/hook-index/ HTH 0 Quote Link to comment Share on other sites More sharing options...
twister Posted September 8, 2021 Author Share Posted September 8, 2021 Not helpful )) for me is not clear, can you provide a hook name ? 0 Quote Link to comment Share on other sites More sharing options...
PapaKai Posted September 8, 2021 Share Posted September 8, 2021 What exactly is a package, a bundle? 0 Quote Link to comment Share on other sites More sharing options...
twister Posted September 8, 2021 Author Share Posted September 8, 2021 Its a product from a group of products 0 Quote Link to comment Share on other sites More sharing options...
PapaKai Posted September 8, 2021 Share Posted September 8, 2021 No idea, check AfterModuleChangePackage. Otherwise check the AfterModule* hooks. If nothing helps ask whmcs support. 0 Quote Link to comment Share on other sites More sharing options...
twister Posted September 8, 2021 Author Share Posted September 8, 2021 Thank you for your help 0 Quote Link to comment Share on other sites More sharing options...
twister Posted September 9, 2021 Author Share Posted September 9, 2021 16 hours ago, PapaKai said: No idea, check AfterModuleChangePackage. Otherwise check the AfterModule* hooks. If nothing helps ask whmcs support. Not your hook nor mine works, is there anyone that knows this stuff? Whmcs support redirects me here @Brian ?? 0 Quote Link to comment Share on other sites More sharing options...
PapaKai Posted September 9, 2021 Share Posted September 9, 2021 I am not familiar with package activation, does it automatically happen after invoice payment? If so, you could give InvoicePaid a try https://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicepaid 0 Quote Link to comment Share on other sites More sharing options...
string Posted September 9, 2021 Share Posted September 9, 2021 You can use the AfterModuleCreate hook. And you can use "logActivity (json_encode ($params))" to find out, what data the $params array contains. Then you use Capsule to insert your data into the database. In my opinion, the documentation of the AfterModuleCreate Hook is sufficient, there isn't really more to describe about this hook. What information are you missing exactly? 0 Quote Link to comment Share on other sites More sharing options...
Bigol'tastynuggets Posted September 10, 2021 Share Posted September 10, 2021 brian! Left due to the shambles that is whmcs so I doubt he'll be coming to the rescue sadly! Hopefully whmcs invest their newfound wealth into more support staff to help as I think the community is a bit jaded with the idea of helping for free since the price rise! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 3, 2021 Share Posted October 3, 2021 On 10/09/2021 at 01:49, Bigol'tastynuggets said: brian! Left due to the shambles that is whmcs so I doubt he'll be coming to the rescue sadly! for the avoidance of doubt, I left because I no longer need, or want, to work for a living and so i'm not going to waste my days constantly supporting a product I no longer use when there are so many more exciting things I can do with my time! on top of that, the policies, incompetence, laziness etc of WHMCS played their part - example, a paying user legitimately asks support for help, and they're passed back to here for the answer - I can only assume either because a) it's considered "customisation" and hence Support scream in horror, and/or b) the support agent just didn't know the answer! even if WHMCS and their staff were the greatest thing since sliced bread, I probably still would have left - but the days of me covering their backsides are over. 1 Quote Link to comment Share on other sites More sharing options...
twister Posted October 3, 2021 Author Share Posted October 3, 2021 3 minutes ago, brian! said: for the avoidance of doubt, I left because I no longer need, or want, to work for a living and so i'm not going to waste my days constantly supporting a product I no longer use when there are so many more exciting things I can do with my time! on top of that, the policies, incompetence, laziness etc of WHMCS played their part - example, a paying user legitimately asks support for help, and they're passed back to here for the answer - I can only assume either because a) it's considered "customisation" and hence Support scream in horror, and/or b) the support agent just didn't know the answer! even if WHMCS and their staff were the greatest thing since sliced bread, I probably still would have left - but the days of me covering their backsides are over. Dude, im gonna miss u. You saved my ass several times, your help was and is much appreciated 0 Quote Link to comment Share on other sites More sharing options...
twister Posted October 3, 2021 Author Share Posted October 3, 2021 On 9/9/2021 at 5:56 PM, string said: You can use the AfterModuleCreate hook. And you can use "logActivity (json_encode ($params))" to find out, what data the $params array contains. Then you use Capsule to insert your data into the database. In my opinion, the documentation of the AfterModuleCreate Hook is sufficient, there isn't really more to describe about this hook. What information are you missing exactly? Got it done with autorelease 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 3, 2021 Share Posted October 3, 2021 9 minutes ago, twister said: Dude, im gonna miss u. You saved my ass several times, your help was and is much appreciated you can always PM me - though there's no guarantee if or how quickly i'll be able to reply. 0 Quote Link to comment Share on other sites More sharing options...
twister Posted October 3, 2021 Author Share Posted October 3, 2021 2 minutes ago, brian! said: you can always PM me - though there's no guarantee if or how quickly i'll be able to reply. Thx so much. Keep helping fellas you are very good at it!! 0 Quote Link to comment Share on other sites More sharing options...
PapaKai Posted October 4, 2021 Share Posted October 4, 2021 On 9/10/2021 at 2:49 AM, Bigol'tastynuggets said: brian! Left oh, didn't realize this at all, but I was already recognizing his inactivity. Sad to see you go brian!, but you have my deepest understanding. 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.