Hi.
Did you mean to start your function when you change the status of the order to delivered in the administration?
public function hookActionOrderStatusPostUpdate($params) { $idOrder = $params['id_order']; // ID Order $oldOs = $params['oldOrderStatus']; // previous Order status $newOs = $params['newOrderStatus']; // current ID Order status $myOsShipped = 4; // Shipped $myOsDelivered = 5; // Delivered if ($newOs == $myOsShipped) { // your function after change state to shipped } if ($newOs == $myOsDelivered) { // your function after change state to delivered } }