Jump to content

ActionOrderStatusUpdate and ActionOrderStatusPostUpdate hooks


anothergilemon

Recommended Posts

Hello,

I'm having a problem with both ActionOrderStatusUpdate and ActionOrderStatusPostUpdate hooks.

I'm trying to execute some code when an Order status is updated to "Processing in progress". If this code is executed successfully, I'd like to automatically pass the order status to "Shipped".

Unfortunately no matter which of these 2 hooks I use (especially ActionOrderStatusPostUpdate) , the "Processing in progress" status is always the latest. It does look like it's impossible to inject another status when PS is executing the "changeIdOrderState". The first status triggering this code will always be the latest.

I have tried directly changing the database by adding few seconds to "date_add" column in the order_history table, but it seems clumsy. Plus, it doesn't solve the problem of having the "current_state" column in orders table remaining in "Processing in progress".

In other words, how can you execute some code after the status of an order as changed and everything is really finished in database?

Hope you can help with this, thanks.

 

Edited by anothergilemon (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...