Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Update Order Status [ Post ] Rate Topic   - - - - -

 

Posted 21 June 2021 - 02:14 PM #1

Is there an update_order_status_post hook i can't seem to locate one.

 

the reason I'm asking is that I'm trying to add a  piece of logic during the update_order_status flow but because of the position of the hook it actually gets undone by the subsequent code.  The situation I'm looking to implement is for the scurri shipping product, where I get the shipping number ( pre paid ) returned by scurri. 

 

the flow I'm looking for is 

 

 

Order set to status processing ( either by the payment interface or admin )

     connect with Scurri and get label

     if scurri returns a failure set the status to ( Processing no label ) 

     else continue with flow.

 

The problem is the return failure I would like to call update_order_status but when that finishes the existing flow completes and the latter steps actually are the ones that update the DB with the order status.

 

the only solution I can see is to add a new hook at the end of the update_order_status but that means changing the core files.

 

any ideas.