27 lines
758 B
PHP
27 lines
758 B
PHP
<?php
|
|
|
|
use Websmid\VatCheck\Config\Config;
|
|
use Websmid\VatCheck\Model\EuCountryAllowList;
|
|
|
|
if (!defined('_PS_VERSION_')) {
|
|
exit;
|
|
}
|
|
|
|
function upgrade_module_1_0_3($module)
|
|
{
|
|
if (!Configuration::updateValue(Config::OFFLINE_MODE_CONFIG_KEY, Config::OFFLINE_MODE_DEFAULT)) {
|
|
return false;
|
|
}
|
|
|
|
if (!Configuration::updateValue(Config::VALIDATE_COMPANY_CONFIG_KEY, Config::VALIDATE_COMPANY_DEFAULT)) {
|
|
return false;
|
|
}
|
|
|
|
// All countries enabled by default, so upgrading doesn't silently narrow
|
|
// exemption eligibility for a shop already relying on the old behavior.
|
|
return Configuration::updateValue(
|
|
Config::EU_COUNTRIES_CONFIG_KEY,
|
|
json_encode(EuCountryAllowList::getAllSupportedIsoCodes())
|
|
);
|
|
}
|