dashed-slug.net › Forums › General discussion › Duplicate currency entries created
Tagged: coinpayments, cron, currencies
- This topic has 3 replies, 2 voices, and was last updated 3 months, 2 weeks ago by alexg.
-
AuthorPosts
-
September 1, 2024 at 7:55 am #13742bassemParticipant
Hi Alex,
I really appreciate your support,
Any idea why I’m getting so many duplicates after installing coinpayment wallet adaper ? Thanks!Attachments:
You must be logged in to view attached files.September 2, 2024 at 5:54 am #13748alexgKeymasterHello,
Thanks for reaching out. I have moved your post its own new thread.
The Coin Adapter extension includes a cron job that continuously attempts to re-create any currencies that you have enabled in CoinPayments. But it should be skipping any already existing currencies.
I have seen this problem before, and it’s hard to track down / reproduce, because it’s a concurrency issue that only occurs on some installations, but fortunately there is a workaround.
First, to make sure, please check the following:
1. Are you running the latest versions of wallets (6.3.1) and the CoinPayments adapter (2.0.8)?
2. Visit _Settings_ -> _Bitcoin and Altcoin Wallets_ -> _Cron tasks_. Do you should see a message telling you to addDISABLE_WP_CRON
to yourwp-config.php
file?If so, please go ahead and apply this edit to
wp-config.php
. This will disable the default trigerring of cron tasks by WordPress.The message will change to notify you that WP CRON is disabled and that you need to trigger crons manually.
You should then set up some external cron that will hit
/wp-cron.php
on your site, once every minute. This has an added benefit: It will also improve the site’s performance, since transaction processing will no longer happen on user HTTP requests.Your cron entry should look something like this:
* * * * * curl -Lk https://example.com/wp-cron.php
You should be able to do this either via Cpanel, or with EasyCron or from another server that you control. Let me know if you need help.
Once you switch the cron tasks to external triggering, the problem should not occur again.
Finally, delete any currencies that are not used, and only leave the ones that already have transactions, if any.
Hope this helps. Please let me know if you encounter any more problems or if you have any questions.
with regards,
AlexSeptember 2, 2024 at 4:37 pm #13749bassemParticipantThanks for your quick response, Alex,
Yes, I am running the latest versions of wallets (6.3.1) and the CoinPayments adapter (2.0.8)
This is a local web server in beta stage behind regular home router so I will fwd 80/443 traffic to my webserver to be able to use external cron that will hit /wp-cron.php.
I will apply and get respond back once solved.Thanks again 🙂
September 3, 2024 at 5:33 am #13750alexgKeymasterHello,
Since you are running on a local web server, you don’t have to forward any ports, you can simply trigger/wp-cron.php
from your local machine.
Let me know if you encounter any problems. -
AuthorPosts
- You must be logged in to reply to this topic.