Allows to add new fields to the Create/Edit Order Status form in the Administration Area.
Usually this event is used together with the
shop:onExtendOrderStatusModel event.
To add new fields to the status form, call the
add_form_field() method of the
status object.
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onExtendOrderStatusModel', $this, 'extend_order_status_model');
Backend::$events->addEvent('shop:onExtendOrderStatusForm', $this, 'extend_order_status_form');
}
public function extend_order_status_model($status, $context)
{
$status->define_column('x_custom_column', 'Custom column')->invisible();
}
public function extend_order_status_form($status, $context)
{
$status->add_form_field('x_custom_column')->tab('Order Status');
}