My website is multi-store
Magento after upgrade 2.2.7 to 2.3.4, facing an issue which creates new order as below
countryId is required. Enter and try again.
On debug I came across that issue is in file
[2020-02-14 10:14:59] report.CRITICAL: "countryId" is required. Enter and try again. {"exception":"[object] (Magento\Framework\Exception\InputException(code: 0): \"countryId\" is required. Enter and try again. at vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php:133)"}
I have verified this link https://github.com/magento/magento2/issues/14232 but not working
Following code is causing the issue
/*$countryElement = $this->_form->getElement('country_id');
$this->processCountryOptions($countryElement);
if ($countryElement->getValue()) {
$countryId = $countryElement->getValue();
$countryElement->setValue(null);
foreach ($countryElement->getValues() as $country) {
if ($country['value'] == $countryId) {
$countryElement->setValue($countryId);
}
}
}
if ($countryElement->getValue() === null) {
$countryElement->setValue(
$this->directoryHelper->getDefaultCountry($this->getStore())
);
}*/