mycred_get_recurring_payout
Description
This function returns the settings and status of a given scheduled recurring payout in the Banking add-on.
This function is only available if the Banking add-on is enabled.
Available since version 1.7
Returns
(array) Returns the setup and status array.
Schedule Setup Example
Array ( [job_title] => '', [status] => 0, [payout] => '', [frequency] => 'daily', [last_run] => '', [total_runs] => 1, [runs_remaining] => 0, [min_balance] => 0, [max_balance] => 0, [id_exclude] => 'exclude', [id_list] => '', [role_exclude] => 'exclude', [role_list] => array(), [log_template] => '%plural% payout', [total_completed] => 0, [total_misses] => 0, [ignore_central] => 0 )
Parameters
Param | Type | Required | Description | |
---|---|---|---|---|
function mycred_get_recurring_payout( |
||||
$schedule_id |
string | Yes | The recurring payout schedule ID. |
|
$point_type |
string | No | The point type key the schedule belongs to. Defaults to the default point type. |
|
) { ... } |
Examples
Example 1: Show the total completed runs a given schedule has made so far.
$schedule_id = 'abc124'; $recurring_payout = mycred_get_recurring_payout( $schedule_id ); printf( 'A total of %d recurring payouts have run so far.', $recurring_payout['total_completed'] );