function hook_uc_stock_adjusted in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_stock/uc_stock.api.php \hook_uc_stock_adjusted()
- 7.3 uc_stock/uc_stock.api.php \hook_uc_stock_adjusted()
Allows modules to take action when a stock level is changed.
Parameters
$sku: The SKU whose stock level is being changed.
$stock: The stock level before the adjustment.
$qty: The amount by which the stock level was changed.
1 invocation of hook_uc_stock_adjusted()
- uc_stock_adjust in uc_stock/
uc_stock.module - Adjusts the product stock level by a set amount.
File
- docs/
hooks.php, line 1751 - These are the hooks that are invoked by the Ubercart core.
Code
function hook_uc_stock_adjusted($sku, $stock, $qty) {
$params = array(
'sku' => $sku,
'stock' => $stock,
'qty' => $qty,
);
drupal_mail('uc_stock_notify', 'stock-adjusted', uc_store_email_from(), language_default(), $params);
}