Clanbite Points

insert( int $user_id, string $points_type_key, string $action_key, int $amount, string $ref = '' ): int

Insert a ledger row and return its ID.

public static

Class: Kernowdev\ClanbitePoints\Points\Ledger

Parameters

$user_id (int) Required

User ID.

$points_type_key (string) Required

Type key.

$action_key (string) Required

Action key.

$amount (int) Required

Points (positive).

$ref (string) Optional

Optional 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

VersionDescription
1.4.0Updated.