Skip to content

Commit c94a2f8

Browse files
committed
MC-34841: free-payment
1 parent 1259899 commit c94a2f8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\QuoteGraphQl\Model\Cart;
99

10+
use Magento\Framework\App\ObjectManager;
1011
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1112
use Magento\GraphQl\Model\Query\ContextInterface;
1213
use Magento\Quote\Api\Data\CartInterface;
@@ -35,16 +36,17 @@ class SetShippingAddressesOnCart implements SetShippingAddressesOnCartInterface
3536
/**
3637
* @param AssignShippingAddressToCart $assignShippingAddressToCart
3738
* @param GetShippingAddress $getShippingAddress
38-
* @param QuoteRepository $quoteRepository
39+
* @param QuoteRepository|null $quoteRepository
3940
*/
4041
public function __construct(
4142
AssignShippingAddressToCart $assignShippingAddressToCart,
4243
GetShippingAddress $getShippingAddress,
43-
QuoteRepository $quoteRepository
44+
QuoteRepository $quoteRepository = null
4445
) {
4546
$this->assignShippingAddressToCart = $assignShippingAddressToCart;
4647
$this->getShippingAddress = $getShippingAddress;
47-
$this->quoteRepository = $quoteRepository;
48+
$this->quoteRepository = $quoteRepository
49+
?? ObjectManager::getInstance()->get(QuoteRepository::class);
4850
}
4951

5052
/**

0 commit comments

Comments
 (0)