insert( int $user_id, string $points_type_key, string $action_key, int $amount, string $ref = '' ): intInsert a ledger row and return its ID.
public static
Class: Kernowdev\ClanbitePoints\Points\Ledger
Parameters
$user_id(int) RequiredUser ID.
$points_type_key(string) RequiredType key.
$action_key(string) RequiredAction key.
$amount(int) RequiredPoints (positive).
$ref(string) OptionalOptional reference to what earned the points (for example
sk_post:34), so they can be taken back later.Default:
''
Returns
int Insert ID or 0.
Defined in inc/Points/Ledger.php
Changelog
| Version | Description |
|---|---|
| 1.4.0 | Updated. |