Function Hook_ecommerce_email->member_for

Definitions

sources/hooks/systems/ecommerce/email.php

  • Get the member who made the purchase.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$type_code ID_TEXT No No required parameter N/A N/A The product codename
$purchase_id ID_TEXT No No required parameter N/A N/A The purchase ID

Returns

  • The member ID (null: none)
  • Type: ?MEMBER
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the member who made the purchase.
 *
 * @param  ID_TEXT $type_code The product codename
 * @param  ID_TEXT $purchase_id The purchase ID
 * @return ?MEMBER The member ID (null: none)
 */

public function member_for(string $type_code, string $purchase_id) : ?int