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!

Exchange Rates do not update.

dashed-slug.net Forums General discussion Exchange Rates do not update.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #8084

    I have 3 coins on my my development box and my production box.


    All three coins are on Coingecko, which I am using to get the exchange rates of the coins. None of the rates seem to be updating the rates on either box. Even when pressing the “Clear/refresh data now!” button.

    Where do I start debugging this problem?



    There are several things you can look at.

    First, check to see if the exchange rates are shown in the boxes below the Exchange rate settings.

    Also check to see if you can get exchange rates from other exchange rate providers.

    To check the exchange rates stored on the DB using wp-cli, do a wp option get wallets_rates | egrep '(LTC|BTC|ARMS)'.

    Enable debugging and click on the “Clear/refresh data now!” button again. Check the logs to see if any errors are shown.

    In case you want to inspect the code using error_log() debug prints, the relevant code that needs to work is this: https://github.com/dashed-slug/wallets/blob/5.0.1/includes/rates.php#L1186-L1233

    The code first identifies the enabled coin adapters, then it determines the CG ids for these coins, it determines the site’s default fiat symbol (usually USD), and finally queries the server for the price of these coins against the fiat symbol.

    You can inspect what $url is constructed, what the $json response contains, and what is returned in the $rates array:

    error_log( $url );

    error_log( $json );

    error_log( print_r( $rates, true ) );

    Hope this helps. Please let me know if you find any issue with the code, or if you need any more help with debugging.

    with regards


    I think I figured it out! Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.