Function Hook_ecommerce_catalogue_items->reduce_stock

Definitions

sources/hooks/systems/ecommerce/catalogue_items.php

  • Update stock levels after a purchase.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$entry_id AUTO_LINK No No required parameter N/A N/A Catalogue entry ID
$quantity integer No No required parameter N/A N/A Quantity to deduct

Preview

Code (PHP)

/**
 * Update stock levels after a purchase.
 *
 * @param  AUTO_LINK $entry_id Catalogue entry ID
 * @param  integer $quantity Quantity to deduct
 */

public function reduce_stock(int $entry_id, int $quantity)