I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Reply To: Is there a way to solve the error when..

dashed-slug.net Forums TurtleCoin Adapter extension support Is there a way to solve the error when.. Reply To: Is there a way to solve the error when..

#9904
alexg
Keymaster

You should not define the same function twice.

Either use the same function to define all your coins, like so:

function wallets_turtlecoin_adapter_filter( $coins ) {

	$coins['ABC'] = array(
		// ABC coin attributes go here
	);

	$coins['XYZ'] = array(
		// XYZ coin attributes go here
	);

	return $coins;
}
add_filter( 'wallets_turtle_coins', 'wallets_turtlecoin_adapter_filter' );

Or if you want to keep things separate, like in different files for example, then you can hook two or more functions to the filter:

function wallets_turtlecoin_adapter_filter_abc( $coins ) {

	$coins['ABC'] = array(
		// ABC coin attributes go here
	);

	return $coins;
}
add_filter( 'wallets_turtle_coins', 'wallets_turtlecoin_adapter_filter_abc' );
function wallets_turtlecoin_adapter_filter_xyz( $coins ) {

	$coins['XYZ'] = array(
		// XYZ coin attributes go here
	);

	return $coins;
}
add_filter( 'wallets_turtle_coins', 'wallets_turtlecoin_adapter_filter_xyz' );

You’ll be glad to know that in wallets6 you won’t be required to know any PHP. I have developed UIs for all of this.

with regards