Commit c9f06920 authored by Jonathan Sacksick's avatar Jonathan Sacksick Committed by Jonathan Sacksick
Browse files

Issue #3307070 by jsacksick: Ignore order items with a NULL unit price.

parent c1711637
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -133,6 +133,10 @@ class RequestBuilder implements RequestBuilderInterface {
  public function buildOrderLines(OrderInterface $order): array {
    $order_lines = [];
    foreach ($order->getItems() as $order_item) {
      // Skip malformed order items.
      if (!$order_item->getUnitPrice()) {
        continue;
      }
      // Fallback to the order item ID.
      $reference = $order_item->id();
      $purchased_entity = $order_item->getPurchasedEntity();