You are here

function commerce_discount_form_pre_render in Commerce Discount 7

Add fields to the additional_settings vertical tabs container.

1 string reference to 'commerce_discount_form_pre_render'
commerce_discount_form in includes/commerce_discount.admin.inc
Form callback: create or edit a discount.

File

includes/commerce_discount.admin.inc, line 442
Commerce discount editing UI.

Code

function commerce_discount_form_pre_render($fields) {
  $fields['additional_settings']['commerce_discount_usage']['discount_usage_per_person'] = $fields['discount_usage_per_person'];
  $fields['additional_settings']['commerce_discount_usage']['discount_usage_limit'] = $fields['discount_usage_limit'];
  $fields['additional_settings']['discount_date']['commerce_discount_date'] = $fields['commerce_discount_date'];
  unset($fields['discount_usage_per_person']);
  unset($fields['discount_usage_limit']);
  unset($fields['commerce_discount_date']);
  return $fields;
}