mycred_add_finished

Codex / mycred/balance / Filters / mycred_add_finished

Description

This filter is the last filter that runs once a transaction has been processed, no matter of the outcome. You can use this filter to detect point gains / loses in order to do some custom tasks based on the request.

Available since version 1.6

Parameters

Param Type Required Description
$result bool Yes

The transaction result. Returns either TRUE if the transaction was executed or FALSE if the transaction was declined.

$request array No

The transaction request that was processed as returned by the mycred_run_this shortcode.

$mycred obj No

The myCRED_Settings class object processing the transaction request.

Used By

Package Prio. Description
mycred/rank 20 Used to determine if the transaction promotes or demotes a users rank.
mycred/badge 30 Used to determine if a successful transaction should earn the user a badge.
mycred/notice 40 Used to determine if the transaction should trigger a popup notification.
mycred/email 50 Used to determine if the transaction should trigger an email notification.

Example

Example 1: Send an email when a user buys points using the buyCRED add-on.

Last edited June 23, 2016