Function Hook_ecommerce_work->process_needed_fields
Definitions
sources/hooks/systems/ecommerce/work.php
- Get the filled in fields and do something with them.May also be called from Admin Zone to get a default purchase ID (i.e. when there's no post context).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
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 |
| $from_admin | boolean | No | No | False | N/A | N/A | Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input. |
Returns
- A pair: The purchase ID, a confirmation box to show (null for no specific confirmation)
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the filled in fields and do something with them.May also be called from Admin Zone to get a default purchase ID (i.e. when there's no post context).
*
* @param ID_TEXT $type_code The product codename
* @param boolean $from_admin Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input.
* @return array A pair: The purchase ID, a confirmation box to show (null for no specific confirmation)
*/
public function process_needed_fields(string $type_code, bool $from_admin = false) : array
* Get the filled in fields and do something with them.May also be called from Admin Zone to get a default purchase ID (i.e. when there's no post context).
*
* @param ID_TEXT $type_code The product codename
* @param boolean $from_admin Whether this is being called from the Admin Zone. If so, optionally different fields may be used, including a purchase_id field for direct purchase ID input.
* @return array A pair: The purchase ID, a confirmation box to show (null for no specific confirmation)
*/
public function process_needed_fields(string $type_code, bool $from_admin = false) : array

