You are here

function uc_recurring_install in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 uc_recurring.install \uc_recurring_install()
  2. 6 uc_recurring.install \uc_recurring_install()

Implements hook_install().

File

./uc_recurring.install, line 232
Installs the Recurring Fee module.

Code

function uc_recurring_install() {

  // Add default extensions periods.
  $defaults = array(
    0 => strtotime("+3 days", 0),
    1 => strtotime("+5 days", 0),
    2 => 0,
  );
  foreach ($defaults as $attempt => $time) {
    db_insert('uc_recurring_extensions')
      ->fields(array(
      'pfid' => NULL,
      'rebill_attempt' => $attempt,
      'time_to_extend' => $time,
    ))
      ->execute();
  }
}