return;
} $ids =
[];
// we don't want to trigger to `update` method when we are inside the order process
if ($event->
getContext()->
hasState('checkout-order-route'
)) { return;
} foreach ($event->
getWriteResults() as $result) { if ($result->
hasPayload('referencedId'
) &&
$result->
getProperty('type'
) === LineItem::PRODUCT_LINE_ITEM_TYPE
) { $ids[] =
$result->
getProperty('referencedId'
);
} if ($result->
getOperation() === EntityWriteResult::OPERATION_INSERT
) { continue;
} $changeSet =
$result->
getChangeSet();
if (!
$changeSet) { continue;
}