Skip to content

Commit 98d584a

Browse files
committed
ACP2E-4072: VAT Validation fails because of VAT API rate limiter - triggers false positive customer group change
1 parent 003d09b commit 98d584a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

app/code/Magento/Customer/Model/Vat.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Customer\Model;
77

@@ -144,6 +144,14 @@ public function getCustomerGroupIdBasedOnVatNumber($customerCountryCode, $vatVal
144144
ScopeInterface::SCOPE_STORE,
145145
$store
146146
);
147+
148+
if (!$groupId) {
149+
$groupId = (int)$this->scopeConfig->getValue(
150+
GroupManagement::XML_PATH_DEFAULT_ID,
151+
ScopeInterface::SCOPE_STORE,
152+
$store
153+
);
154+
}
147155
}
148156

149157
return $groupId;

app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2011 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);

app/code/Magento/Quote/Observer/Frontend/Quote/Address/VatValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2013 Adobe
44
* All Rights Reserved.
55
*/
66
namespace Magento\Quote\Observer\Frontend\Quote\Address;

0 commit comments

Comments
 (0)