diff --git a/core/lib/Thelia/Controller/Admin/TranslationsController.php b/core/lib/Thelia/Controller/Admin/TranslationsController.php index 93aab31cb..6c2aed749 100644 --- a/core/lib/Thelia/Controller/Admin/TranslationsController.php +++ b/core/lib/Thelia/Controller/Admin/TranslationsController.php @@ -181,13 +181,6 @@ class TranslationsController extends BaseAdminController case 'ma' : $template = new TemplateDefinition($item_name, TemplateDefinition::EMAIL); break; - - default: - /* - throw new \InvalidArgumentException( - $this->getTranslator()->trans("Undefined translation type: %item", ['%item' => $item_to_translate]) - ); - */ } if ($template) { diff --git a/core/lib/Thelia/Coupon/Type/FreeProduct.php b/core/lib/Thelia/Coupon/Type/FreeProduct.php index 5fe65b1b0..42a106f4e 100644 --- a/core/lib/Thelia/Coupon/Type/FreeProduct.php +++ b/core/lib/Thelia/Coupon/Type/FreeProduct.php @@ -230,10 +230,6 @@ class FreeProduct extends AbstractRemoveOnProducts $this->setRelatedCartItem($eligibleProduct, $cartEvent->getCartItem()->getId()); $freeProductCartItem = $cartEvent->getCartItem(); - - // Setting product price is dangerous, as the customer could change the ordered quantity of this product. - // We will instead add the product price to the order discount. - // $cartEvent->getCartItem()->setPrice(0)->save(); } }