mycred_refund_transfer

Description

This function attempts to refund a completed transfer.

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

Available since version 1.8

Returns

(bool) Returns TRUE if the refund was successful else FALSE.

Parameters

Param Type Required Description
function mycred_refund_transfer(
$transfer_id string Yes

The transfer ID.

) { ... }

Examples

Example 1: Basic usage example.

$transfer_id = 'TXT384723943843';
if ( function_exists( 'mycred_get_transfer' ) ) {

	$transfer = mycred_refund_transfer( $transfer_id );
	if ( $transfer === true ) {

		// transfer was refunded

	}
	else {

		// Refund failed

	}

}