add_action('wcus_ttn_carrier_status_updated', function ($event) {
$event->order->add_order_note(sprintf(
'Status changed. New status - [%d] %s, Old status - [%d] %s. TTN number - %s',
$event->newStatus,
$event->newStatusText,
$event->oldStatus,
$event->oldStatusText,
$event->ttn['ttn_id']
));
});