code: protected function watch(OrderInterface $order)
      {
          // Abort if notify disabled or sample order
          if (!$order->isAutoNotify() || $order->isSample()) {
              return;
          }
  
          // Abort if sale has notification of type 'SALE_ACCEPTED'
          if ($order->hasNotifications(NotificationTypes::ORDER_ACCEPTED)) {
              return;
          }
  
          // Abort if state has not changed for 'ACCEPTED'
          if (!$this->didStateChangeTo($order, OrderStates::STATE_ACCEPTED)) {
              return;
          }
  
          $this->notify(NotificationTypes::ORDER_ACCEPTED, $order);
      }
docs: Order watcher.
  
  @param OrderInterface $order