Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix problem with free shipping voucher
IKarbowiak9174215ddad9
diff --git a/saleor/checkout/utils.py b/saleor/checkout/utils.pyindex 90c72376bb..d5f4900c48 100644--- a/saleor/checkout/utils.py+++ b/saleor/checkout/utils.py@@ -784,7 +784,11 @@ def recalculate_checkout_discount(checkout, discounts):else:manager = get_extensions_manager()subtotal = manager.calculate_checkout_subtotal(checkout, discounts).gross- checkout.discount = min(discount, subtotal)+ checkout.discount = (+ min(discount, subtotal)+ if voucher.type != VoucherType.SHIPPING+ else discount+ )checkout.discount_name = str(voucher)checkout.translated_discount_name = (voucher.translated.name