You are here

function uc_recurring_enable in Ubercart 5

Implementation of hook_enable().

File

payment/uc_recurring/uc_recurring.module, line 96
Allows you to add a recurring fee to a product/SKU to handle subscription type services.

Code

function uc_recurring_enable() {

  // Get the weight of the Credit Card module.
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = '%s'", 'uc_credit'));

  // Update the weight of the recurring module so its hooks get called after the
  // credit module.
  db_query("UPDATE {system} SET weight = %d WHERE name = '%s'", max(1000, $weight + 1), 'uc_recurring');
}