PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 30, 2023
Let's talk code, commerce and open source.

Hook actionOrderStatusUpdate

Aliases:

  • updateOrderStatus

Information

Order status update - Event:

This hook launches modules when the status of an order changes

Hook locations:

  • front office

Hook type: action

Located in:

Parameters details

    <?php
    array(
      'newOrderStatus' => (object) OrderState,
      'oldOrderStatus' => (object) OrderState,
      'id_order' => (int) Order ID
    );

Call of the Hook in the origin file

Hook::exec('actionOrderStatusUpdate', [
            'newOrderStatus' => $new_os,
            'oldOrderStatus' => $old_os,
            'id_order' => (int) $order->id,
        ], null, false, true, false, $order->id_shop)