diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md
index 195c6a1..971f010 100644
--- a/CHANGELOG_de-DE.md
+++ b/CHANGELOG_de-DE.md
@@ -1,3 +1,6 @@
+# 2.0.6
+* Problem mit dem freien ESD-Element behoben.
+
# 2.0.5
* Problem mit dem freien ESD-Element behoben.
diff --git a/CHANGELOG_en-GB.md b/CHANGELOG_en-GB.md
index df68b97..6f640a6 100644
--- a/CHANGELOG_en-GB.md
+++ b/CHANGELOG_en-GB.md
@@ -1,3 +1,6 @@
+# 2.0.6
+* Fixed issue that regarding the free ESD item
+
# 2.0.5
* Fixed issue that regarding the free ESD item
diff --git a/composer.json b/composer.json
index 5805b2f..839bd56 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description":"ESD / Download plugin",
"type":"shopware-platform-plugin",
"keywords": ["esd", "download"],
- "version":"2.0.5",
+ "version":"2.0.6",
"license":"proprietary",
"authors":[
{
diff --git a/src/Checkout/Cart/Subscriber/OrderPlacedSubscriber.php b/src/Checkout/Cart/Subscriber/OrderPlacedSubscriber.php
index 55d8c83..1a4dda4 100644
--- a/src/Checkout/Cart/Subscriber/OrderPlacedSubscriber.php
+++ b/src/Checkout/Cart/Subscriber/OrderPlacedSubscriber.php
@@ -17,9 +17,10 @@
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\System\SystemConfig\SystemConfigService;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
-class OrderPlacedSubscriber
+class OrderPlacedSubscriber implements EventSubscriberInterface
{
public function __construct(
private readonly EntityRepository $productRepository,
@@ -29,7 +30,14 @@ public function __construct(
) {
}
- public function __invoke(CheckoutOrderPlacedEvent $event): void
+ public static function getSubscribedEvents(): array
+ {
+ return [
+ CheckoutOrderPlacedEvent::class => 'handle',
+ ];
+ }
+
+ public function handle(CheckoutOrderPlacedEvent $event): void
{
$orderLineItems = $event->getOrder()->getLineItems();
diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml
index 2bfb92f..7f18d6a 100644
--- a/src/Resources/config/services.xml
+++ b/src/Resources/config/services.xml
@@ -48,13 +48,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+