Jump to content

Hook for new order


colm

Recommended Posts

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

Link to comment
Share on other sites

  • 6 years later...

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.

Link to comment
Share on other sites

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 😉


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated