code: public function onPreDelete(ResourceEventInterface $event)
      {
          $this->throwIllegalOperationIfItemIsImmutable($event);
  
          $item = $this->getSaleItemFromEvent($event);
  
          if (null === $sale = $item->getSale()) {
              return;
          }
  
          $items = $sale->getItems()->toArray();
          foreach ($items as $item) {
              $this->loadItem($item);
          }
      }
docs: Pre delete event handler.
  
  @param ResourceEventInterface $event
  
  @throws IllegalOperationException