josh6025 Posted April 9, 2009 Share Posted April 9, 2009 Where can I find the vars for this action hook function actionhook_AfterModuleCreate($vars) { # This function runs when a module creation command completes successfully - various variables available } 0 Quote Link to comment Share on other sites More sharing options...
dan.trainor Posted April 10, 2009 Share Posted April 10, 2009 Hi - I just did a print_r($vars); inside the action hook. Remember, though, that they do not work as you might expect. These are general action hooks. In order to make an action hook actually do anything, it needs to be inside a custom module. I've spent (in some cases, wasted ) several days trying to figure this out from support. I'm disappointed, but I suppose it makes sense - why would I want these action hooks - which I'm using to set up other products and services that WHMCS does not directly integrate with - run every single time any module did anything? Thanks -dant 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted April 10, 2009 Share Posted April 10, 2009 Hi - I just did a print_r($vars); inside the action hook. Remember, though, that they do not work as you might expect. These are general action hooks. In order to make an action hook actually do anything, it needs to be inside a custom module. Yes and no, you can check from the vars the module that the product is using then just call your code conditionally on these modules. Poweeful integration is possible and can be done, also v4 has even more hook points which will allow even futher integration. Anything is possible you just have to think outside the box. 0 Quote Link to comment Share on other sites More sharing options...
dan.trainor Posted April 10, 2009 Share Posted April 10, 2009 Hi - I'm about to light the box on fire, honestly. I understand at this point where the action hooks apply, what they do etc etc. Since none of this is even documented to begin with, most of my time has been spent trying to see what I can execute, where, using a combination of debug_backtrace(), print_r(), and just writing to temp test files Thanks -dant 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted April 10, 2009 Share Posted April 10, 2009 trying to see what I can execute to which the answer is ... "anything you can imagine" 0 Quote Link to comment Share on other sites More sharing options...
dan.trainor Posted April 10, 2009 Share Posted April 10, 2009 Hi - Yeah, doesn't help that there's a fundamental flaw in what changes (or complete lack thereof) to a module device takes when the Status of an order or Product is changed. I've been griping about that all day Thanks -dant 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted April 11, 2009 Share Posted April 11, 2009 when the Status of an order or Product is changed you change the status of a product by clicking the action buttons, not by editting the drop-down list - and then your "problem" goes away ... 0 Quote Link to comment Share on other sites More sharing options...
dan.trainor Posted April 11, 2009 Share Posted April 11, 2009 Hi - So... using a module Action button will subsequently have the effect of changing the Status of the Product as seen by WHMCS? Also, when a payment type is declined, which field is initiated/change? That actual Status field, or my Module command? How come this isn't documented? Its not. Fact. Do you know how much that sucks? What gives? Thanks -dant 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted April 11, 2009 Share Posted April 11, 2009 >using a module Action button will subsequently have the effect of changing the Status yes >Also, when a payment type is declined, which field is initiated/change? the module function is called, same as manually clicking the button >How come this isn't documented because the documentation's not "matured" yet 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.