Skip to content

Commit 95278e2

Browse files
AC-8385: MFTF Test Fix
1 parent b2b3a01 commit 95278e2

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

app/code/Magento/Quote/Model/QuoteAddressValidator.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Magento\Customer\Api\AddressRepositoryInterface;
1111
use Magento\Customer\Api\CustomerRepositoryInterface;
1212
use Magento\Customer\Model\Session;
13-
use Magento\Framework\App\DeploymentConfig;
1413
use Magento\Framework\Exception\InputException;
1514
use Magento\Framework\Exception\LocalizedException;
1615
use Magento\Framework\Exception\NoSuchEntityException;
@@ -24,7 +23,6 @@
2423
*/
2524
class QuoteAddressValidator
2625
{
27-
private const XML_CHECKOUT_CONFIG_VALUE = 'checkout/async';
2826
/**
2927
* @var AddressRepositoryInterface
3028
*/
@@ -42,29 +40,21 @@ class QuoteAddressValidator
4240
*/
4341
protected Session $customerSession;
4442

45-
/**
46-
* @var DeploymentConfig
47-
*/
48-
private DeploymentConfig $deploymentConfig;
49-
5043
/**
5144
* Constructs a quote shipping address validator service object.
5245
*
5346
* @param AddressRepositoryInterface $addressRepository
5447
* @param CustomerRepositoryInterface $customerRepository Customer repository.
5548
* @param Session $customerSession
56-
* @param DeploymentConfig $deploymentConfig
5749
*/
5850
public function __construct(
5951
AddressRepositoryInterface $addressRepository,
6052
CustomerRepositoryInterface $customerRepository,
61-
Session $customerSession,
62-
DeploymentConfig $deploymentConfig
53+
Session $customerSession
6354
) {
6455
$this->addressRepository = $addressRepository;
6556
$this->customerRepository = $customerRepository;
6657
$this->customerSession = $customerSession;
67-
$this->deploymentConfig = $deploymentConfig;
6858
}
6959

7060
/**
@@ -164,10 +154,9 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI
164154
*/
165155
public function validateForCart(CartInterface $cart, AddressInterface $address): void
166156
{
167-
if ((!$this->deploymentConfig->get(self::XML_CHECKOUT_CONFIG_VALUE)) && $cart->getCustomerIsGuest()) {
157+
if ($cart->getCustomerIsGuest()) {
168158
$this->doValidateForGuestQuoteAddress($address, $cart);
169159
}
170-
171160
$this->doValidate($address, $cart->getCustomerIsGuest() ? null : (int) $cart->getCustomer()->getId());
172161
}
173162

0 commit comments

Comments
 (0)