You are here

commerce_stock.api.php in Commerce Stock 7.2

Hooks provided by the Commerce Stock module.

File

commerce_stock.api.php
View source
<?php

/**
 * @file
 * Hooks provided by the Commerce Stock module.
 */

/**
 * Hook cart product level alter.
 *
 * Allows modules to return a cart product level for a product id before the
 * Commerce Stock module determines it using its default queries.
 *
 * @param string $product_id
 *   The product_id of the product whose cart quantity should be returned.
 *
 * @return mixed
 *   The cart quantity (if a valid quantity was found), FALSE (if the product
 *   should have no cart product level), or NULL (if the implementation cannot
 *   tell if the product has a cart product level or not).
 */
function hook_commerce_stock_cart_product_level_alter($product_id) {

  // No example.
}

Functions

Namesort descending Description
hook_commerce_stock_cart_product_level_alter Hook cart product level alter.