colm Posted April 29, 2015 Share Posted April 29, 2015 Hi, Is there any Hook that fires when a new order is created? I would like to send a request to the API of another server whenever an order is created. It seems that I can use ShoppingCartCheckoutCompletePage where the order is paid for, however I'm not sure how this would work for a free trial. Also I would like to capture the scenario where an admin creates an order on behalf of a customer and this doesnt seem to be covered at all - neither AcceptOrder nor PendingOrder fired when I tested. Any advice welcome! Thanks Colm 0 Quote Link to comment Share on other sites More sharing options...
weba Posted February 17, 2022 Share Posted February 17, 2022 Its some time ago, but did you find 'the new order' hook ? Because ShoppingCartCheckoutCompletePage is only for new products and not updates. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted February 17, 2022 Share Posted February 17, 2022 Made a few questions: - Is your order free ? So you cannot use OrderPaid. - Want to call the API after order is paid ? Use OrderPaid. -What’s the order flow ? Pending ? Use PendingOrder. Pending and then Accept ? Use AcceptOrder. - Do you want to catch free products ? When the service is been created ? Use PreModuleCreate or AfterModuleCreate. 0 Quote Link to comment Share on other sites More sharing options...
weba Posted February 17, 2022 Share Posted February 17, 2022 thx for your answers. I did find those but was wandering why I could not find the hook 'neworder'. Orderpaid is as you expect only for paid orders, I want the hook for all orders and check the status myself. So also for updates/upgrades because in the hook I want to decide on some factors if the order can accepted/processed or not. Another thing is, acceptorder does not cover updates/upgrade on configurable options. whmcs acknoledged that this is not available and that I could enter it as a feature request but in my opinion its a bug 😉 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted February 17, 2022 Share Posted February 17, 2022 Many indexes are missing or could be included but WHMCS is not adding them by request. Maybe on v9, if request get upvoted on requests.whmcs.com…It’s a usual practice. 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.