Skip to content

Commit 7b1a7bd

Browse files
committed
Merge branch '3.2' into 4.0
* 3.2: [Core] fix for gift digital product (revert bc break)
2 parents 63e9e88 + 254d063 commit 7b1a7bd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/CoreShop/Component/Core/Cart/Rule/Action/GiftProductActionProcessor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ public function applyRule(OrderInterface $cart, array $configuration, PriceRuleI
7474
$item = $this->cartItemFactory->createWithCart($cart, $product);
7575
$item->setQuantity(1);
7676
$item->setIsGiftItem(true);
77-
$item->setDigitalProduct($product->getDigitalProduct());
77+
78+
if ($product instanceof ProductInterface) {
79+
$item->setDigitalProduct($product->getDigitalProduct());
80+
}
7881

7982
if (
8083
$product instanceof ProductInterface &&

src/CoreShop/Component/Order/Model/PurchasableInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ public function getName(?string $language = null): ?string;
3131
public function getWholesaleBuyingPrice(): ?Money;
3232

3333
public function getTaxRule(): ?TaxRuleGroupInterface;
34-
35-
public function getDigitalProduct(): ?bool;
3634
}

0 commit comments

Comments
 (0)