Description
This function retrieves the myCRED_Transfer object, populated based on the given transfer ID. This function can only be used for transfers that have been processed.
Returns
(bool | object) Either the myCRED_Transfer object or FALSE
if the transfer was not found.
Parameters
Param | Type | Required | Description | |
---|---|---|---|---|
function mycred_get_transfer( |
||||
$transfer_id |
string | Yes | The transfer ID. |
|
) { ... } |
Example
Example 1: Get the transfer object for a transfer ID.
$transfer_id = 'TXT384723943843'; if ( function_exists( 'mycred_get_transfer' ) ) { $transfer = mycred_get_transfer( $transfer_id ); if ( $transfer !== false ) { // found transfer } }