diff --git a/vendor/magento/module-quote-graph-ql/Model/GetDiscounts.php b/vendor/magento/module-quote-graph-ql/Model/GetDiscounts.php index e0122a00a656f..8c60feefb6431 100644 --- a/vendor/magento/module-quote-graph-ql/Model/GetDiscounts.php +++ b/vendor/magento/module-quote-graph-ql/Model/GetDiscounts.php @@ -22,8 +22,6 @@ class GetDiscounts */ public function execute(Quote $quote, array $discounts): ?array { - $discounts = $discounts ?: $quote->getBillingAddress()->getExtensionAttributes()->getDiscounts() ?? []; - if (empty($discounts)) { return null; } diff --git a/vendor/magento/module-quote-graph-ql/Model/Resolver/Discounts.php b/vendor/magento/module-quote-graph-ql/Model/Resolver/Discounts.php index 83c64258226cf..4095d6b483279 100644 --- a/vendor/magento/module-quote-graph-ql/Model/Resolver/Discounts.php +++ b/vendor/magento/module-quote-graph-ql/Model/Resolver/Discounts.php @@ -1,7 +1,7 @@ getIsVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress(); + $discounts = $address->getExtensionAttributes()?->getDiscounts() ?? []; return $this->getDiscounts->execute( $quote, - $quote->getShippingAddress()->getExtensionAttributes()->getDiscounts() ?? [] + $discounts ); } }