dashed-slug.net › Forums › TurtleCoin Adapter extension support › Is there a way to solve the error when..
Tagged: coin adapter, filter, hook, turtlecoin, wallets_turtle_coins
- This topic has 3 replies, 2 voices, and was last updated 3 years, 11 months ago by alexg.
-
AuthorPosts
-
January 28, 2021 at 9:57 am #9895LeinAdParticipant
adding more than one xyz coin?
Fatal error: Cannot redeclare wallets_turtlecoin_adapter_filter() (previously declared in /var/www/html/wordpress/wp-content/plugins/wrkz.php:12)January 29, 2021 at 7:41 am #9904alexgKeymasterYou 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
January 29, 2021 at 9:46 am #9905LeinAdParticipantwill it easy to migrate the existing wallets then?
February 1, 2021 at 7:48 am #9911alexgKeymasterHello,
The new plugin will automatically migrate the deposit addresses and transactions (and therefore balances) to the new format. There will be an extensive article detailing how this works. You will not have to do anything for this, other than ensure that the cron jobs are running.
Connection to the wallets will not be migrated automatically, you will need to create wallets and currencies. This will be detailed in the installation instructions and via WordPress admin pointers. It will be easy, and if you have any questions about it you can post in the new migration support forum.
You will be able to perform these changes at any time, and you can safely revert to the previous version if any issue arises.
If you have any more questions about this, please post them at the migration support forum.
with regards
-
AuthorPosts
- You must be logged in to reply to this topic.