Skip to content

Commit

Permalink
fixup! added saveOrderTo Convertim
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik committed Oct 30, 2024
1 parent 87b037b commit b4ff4cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Model/Order/ConvertimOrderDataToOrderDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ protected function mapProducts(ConvertimOrderData $convertimOrderData, OrderData
*/
protected function mapPromoCodes(ConvertimOrderData $convertimOrderData, OrderData $orderData): void
{
$orderData->promoCode = $convertimOrderData->getPromoCodes()[0]->getCode();
$promoCodes = $convertimOrderData->getPromoCodes();

if (count($promoCodes) > 0) {
$orderData->promoCode = $promoCodes[0]->getCode();
}
}

/**
Expand Down

0 comments on commit b4ff4cc

Please sign in to comment.