mycred_get_transfer

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.

This function is only available if the Transfer add-on is enabled.

Available since version 1.8

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.

) { ... }

Examples

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

	}

}