wcus_ttn_carrier_status_updated

Usage example

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']
	));
});

Accepted arguments:

$event - \kirillbdev\WCUkrShipping\Model\Event\Document\CarrierStatusChangedEvent
final class CarrierStatusChangedEvent
{
    private string $oldStatus; // example - 1
    private string $oldStatusText; // example - Видалено
    private string $newStatus;
    private string $newStatusText;
    private array $ttn; // TTN data from wp_wc_ukr_shipping_np_ttn table
    private \WC_Order $order; // WooCommerce order
}