You are here

function uc_stock_mail in Ubercart 8.4

Same name and namespace in other branches
  1. 6.2 uc_stock/uc_stock.module \uc_stock_mail()
  2. 7.3 uc_stock/uc_stock.module \uc_stock_mail()

Implements hook_mail().

File

uc_stock/uc_stock.module, line 51
Allow ubercart products to have stock levels associated with their SKU.

Code

function uc_stock_mail($key, &$message, $params) {
  $langcode = isset($message['language']) ? $message['language']->language : NULL;
  switch ($key) {
    case 'threshold':
      $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed';
      $message['subject'] = $params['subject'];
      $message['body'][] = $params['body'];
      break;
  }
}