You are here

function commerce_coupon_save in Commerce Coupon 7

Same name and namespace in other branches
  1. 7.2 commerce_coupon.module \commerce_coupon_save()

Saves a coupon.

Parameters

$commerce_coupon: The full coupon object to save.

Return value

SAVED_NEW or SAVED_UPDATED depending on the operation performed.

3 calls to commerce_coupon_save()
commerce_coupon_form_submit in includes/commerce_coupon_ui.forms.inc
Submit callback for commerce_coupon_form().
commerce_coupon_type_disable in ./commerce_coupon.module
Disables a coupon type and set as inactive all the coupons from the type.
commerce_coupon_ui_settings_upgrade_coupons_batch_worker in includes/commerce_coupon_ui.settings.inc

File

./commerce_coupon.module, line 704
Coupon System for Drupal Commerce.

Code

function commerce_coupon_save($commerce_coupon) {
  return entity_get_controller('commerce_coupon')
    ->save($commerce_coupon);
}