Your cart is empty!
Count Remaining
public function onCountRemainingPackages(mixed &$query, int $serviceId) : void
Fires while counting the remaining (redeemable) packages for a specific user/order.
Description
This hook can be used to apply additional restrictions while counting the remaining number of packages that can be redeemed for the specified service.
Parameters
- &$query
-
(mixed) Either a SQL string or a query builder object.
- $serviceId
-
(int) The ID of the service.
Return Value
None.
Example
/**
* Applies additional restrictions while counting the remaining number of packages
* that can be redeemed for the specified service.
*
* @param string &$query The database query used to count the remaining packages.
* @param int $serviceId The ID of the service that should be redeemed.
*
* @return void
*/
public function onCountRemainingPackages(&$query, $serviceId)
{
/**
* @todo extend here the query used to count the remaining packages
*/
}
Changelog
| Version | Description |
|---|---|
| 1.7.4 | Introduced. |
Last Update: 4 hours ago.
Helpful?