code: protected function dispatchPrepareEvent(SaleInterface $sale)
      {
          if (!$sale instanceof OrderInterface) {
              throw new InvalidArgumentException("Expected instance of " . OrderInterface::class);
          }
  
          $event = $this->eventDispatcher->createResourceEvent($sale);
  
          try {
              $this->eventDispatcher->dispatch(OrderEvents::PREPARE, $event);
          } catch (IllegalOperationException $e) {
              return false;
          }
  
          return true;
      }
docs: Dispatches the sale prepare event.
  
  @param SaleInterface $sale
  
  @return bool