Skip to content

Commit

Permalink
Merge branch '0.12.x' into 0.12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ehibes authored Oct 7, 2024
2 parents 0874a98 + c176483 commit 4720810
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
5 changes: 0 additions & 5 deletions src/Modifier/OrderGiftCardAmountModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Setono\SyliusGiftCardPlugin\Modifier;

use Doctrine\Persistence\ObjectManager;
use RuntimeException;
use Setono\SyliusGiftCardPlugin\Model\AdjustmentInterface;
use Setono\SyliusGiftCardPlugin\Model\GiftCardInterface;
Expand Down Expand Up @@ -38,8 +37,6 @@ public function decrement(OrderInterface $order): void
$giftCard->setAmount($giftCard->getAmount() - $amount);
}
}

$this->giftCardManager->flush();
}

public function increment(OrderInterface $order): void
Expand All @@ -53,8 +50,6 @@ public function increment(OrderInterface $order): void
$giftCard->enable();
}
}

$this->giftCardManager->flush();
}

private function getGiftCard(OrderInterface $order, string $code): GiftCardInterface
Expand Down
4 changes: 1 addition & 3 deletions src/Resources/config/services/modifier.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<!-- Needs to be public because it is called from the state machine -->
<service id="setono_sylius_gift_card.modifier.order_gift_card_amount"
class="Setono\SyliusGiftCardPlugin\Modifier\OrderGiftCardAmountModifier"
public="true">
<argument type="service" id="setono_sylius_gift_card.manager.gift_card"/>
</service>
public="true"/>
</services>
</container>

0 comments on commit 4720810

Please sign in to comment.