function commerce_avatax_uninstall in Drupal Commerce Connector for AvaTax 7.4
Same name and namespace in other branches
- 7.5 commerce_avatax.install \commerce_avatax_uninstall()
- 7.3 commerce_avatax.install \commerce_avatax_uninstall()
Implements hook_uninstall().
File
- ./
commerce_avatax.install, line 74 - Installation functions for Commerce AvaTax Connector.
Code
function commerce_avatax_uninstall() {
// Delete AvaTax variables.
db_delete('variable')
->condition('name', "commerce_avatax_%", "LIKE")
->execute();
cache_clear_all('variables', 'cache');
// Delete AvaTax rules.
$rules = rules_config_load_multiple(FALSE);
foreach ($rules as $rule) {
if (strpos($rule->name, 'commerce_avatax') === 0) {
rules_config_delete(array(
$rule->id,
));
}
}
}