Function Hook_ecommerce_usergroup->get_products

Definitions

sources/hooks/systems/ecommerce/usergroup.php

  • Get the products handled by this eCommerce hook.IMPORTANT NOTE TO PROGRAMMERS: This function may depend only on the database, and not on get_member() or any GET/POST values.Such dependencies will break IPN, which works via a Guest and no dependable environment variables. It would also break manual transactions from the Admin Zone.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
&$search ?ID_TEXT Yes No Null N/A N/A Product being searched for (passed by reference as it may be modified for special cases) (null: none)

Returns

  • A map of product name to list of product details
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the products handled by this eCommerce hook.IMPORTANT NOTE TO PROGRAMMERS: This function may depend only on the database, and not on get_member() or any GET/POST values.Such dependencies will break IPN, which works via a Guest and no dependable environment variables. It would also break manual transactions from the Admin Zone.
 *
 * @param  ?ID_TEXT $search Product being searched for (passed by reference as it may be modified for special cases) (null: none)
 * @return array A map of product name to list of product details
 */

public function get_products(?string &$search = null) : array