Hi Team,
Recently we upgraded nop 4.0 to 4.2 .
While uninstalling avalara plugin take more then 1 hour
Any reason for that ? or it's bug ?
foreach (var taxCategory in _taxCategoryService.GetAllTaxCategories())
{
_genericAttributeService.SaveAttribute<string>(taxCategory, AvalaraTaxDefaults.TaxCodeDescriptionAttribute, null);
_genericAttributeService.SaveAttribute<string>(taxCategory, AvalaraTaxDefaults.TaxCodeTypeAttribute, null);
}
foreach (var customer in _customerService.GetAllCustomers())
{
_genericAttributeService.SaveAttribute<string>(customer, AvalaraTaxDefaults.EntityUseCodeAttribute, null);
}
foreach (var customerRole in _customerService.GetAllCustomerRoles(true))
{
_genericAttributeService.SaveAttribute<string>(customerRole, AvalaraTaxDefaults.EntityUseCodeAttribute, null);
}
foreach (var product in _productService.SearchProducts(showHidden: true))
{
_genericAttributeService.SaveAttribute<string>(product, AvalaraTaxDefaults.EntityUseCodeAttribute, null);
}
foreach (var attribute in _checkoutAttributeService.GetAllCheckoutAttributes())
{
_genericAttributeService.SaveAttribute<string>(attribute, AvalaraTaxDefaults.EntityUseCodeAttribute, null);
}
//settings
_taxSettings.ActiveTaxProviderSystemName = _taxPluginManager.LoadAllPlugins()
.FirstOrDefault(taxProvider => !taxProvider.PluginDescriptor.SystemName.Equals(AvalaraTaxDefaults.SystemName))
?.PluginDescriptor.SystemName;
_settingService.SaveSetting(_taxSettings);
_widgetSettings.ActiveWidgetSystemNames.Remove(AvalaraTaxDefaults.SystemName);
_settingService.SaveSetting(_widgetSettings);
_settingService.DeleteSetting<AvalaraTaxSettings>();