You are here

commerce_invoice_receipt.install in Commerce Invoice Receipt 7.2

Same filename and directory in other branches
  1. 7 commerce_invoice_receipt.install

Commerce Invoice Receipt - Installation file.

File

commerce_invoice_receipt.install
View source
<?php

/**
 * @file
 * Commerce Invoice Receipt - Installation file.
 */

/**
 * Implements hook_install().
 */
function commerce_invoice_receipt_install() {
  variable_set('mail_system', array_merge(variable_get('mail_system', array(
    'default-system' => 'DefaultMailSystem',
  )), array(
    'commerce_invoice_receipt' => 'InvoiceMailSystem',
  )));
}

/**
 * Implements hook_uninstall().
 */
function commerce_invoice_receipt_uninstall() {
  $mail_system = variable_get('mail_system', array(
    'default-system' => 'DefaultMailSystem',
  ));
  unset($mail_system['commerce_invoice_receipt']);
  variable_set('mail_system', $mail_system);
}

/**
 * Remove old variables stored as admin settings.
 */
function commerce_invoice_receipt_update_7021(&$sandbox) {
  variable_del('commerce_invoice_send_from');
  variable_del('commerce_invoice_copy_all_user');
  variable_del('commerce_invoice_copy_all_user_method');
  return t('Old variables removed successfully.');
}

Functions

Namesort descending Description
commerce_invoice_receipt_install Implements hook_install().
commerce_invoice_receipt_uninstall Implements hook_uninstall().
commerce_invoice_receipt_update_7021 Remove old variables stored as admin settings.