function commerce_coupon_uninstall in Commerce Coupon 7
Same name and namespace in other branches
- 7.2 commerce_coupon.install \commerce_coupon_uninstall()
Implements hook_uninstall().
File
- ./
commerce_coupon.install, line 126 - Install, update and uninstall functions for the commerce_coupon module.
Code
function commerce_coupon_uninstall() {
// Make sure commerce.module is loaded so that commerce_delete_instances()
// is available.
module_load_include('module', 'commerce');
// Delete all fields that belong to the module's entity types.
commerce_delete_instances('commerce_coupon_log');
commerce_delete_instances('commerce_coupon');
commerce_delete_field('commerce_coupon_order_reference');
commerce_delete_field('commerce_coupon_reference');
// Delete all module variables.
variable_del('commerce_coupon_default_code_size');
variable_del('commerce_coupon_checkout_pane_view');
variable_del('commerce_coupon_review_pane_view');
variable_del('commerce_coupon_checkout_enable_add_button');
}