You are here

function uc_recurring_product_fee_product_save in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_product/uc_recurring_product.module \uc_recurring_product_fee_product_save()

Saves a recurring product.

Parameters

$product: A recurring product object.

1 call to uc_recurring_product_fee_product_save()
uc_recurring_product_feature_save in modules/uc_recurring_product/uc_recurring_product.module

File

modules/uc_recurring_product/uc_recurring_product.module, line 660
Add recurring payments/fees to a product. This is imlpemented through Ubercarts product features.

Code

function uc_recurring_product_fee_product_save($product) {

  // Allow other modules to change the saved data.
  drupal_alter('recurring_fee_product_save', $product);

  // Delete existing record.
  db_delete('uc_recurring_product')
    ->condition('pfid', $product->pfid)
    ->execute();
  drupal_write_record('uc_recurring_product', $product);
}