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: coin ticker hide

dashed-slug.net Forums Faucet extension support coin ticker hide Reply To: coin ticker hide

#9805
alexg
Keymaster

Hello,

The balance-static.php template corresponds to the shortcode [wallets_balance template="static"]. This is for rendering the balance UI on the server side. You get no live updates to the values, but you can pass the user_id or symbol attributes. All of this mess will be resolved in wallets6.

The best way to control the symbol next to amounts is not to override the templates, but to use the special filter for this purpose.

From the documentation to the JSON-API.

Amounts pattern

Cryptocurrency amounts in the frontend are passed through an sprintf() function. The JavaScript implementation used is https://github.com/alexei/sprintf.js.

wallets_sprintf_pattern_XYZ – Display pattern for amounts of coin with symbol XYZ.

To override the frontend display format for Bitcoin amounts:

        public function filter_wallets_sprintf_pattern_BTC( $pattern ) {
                return 'BTC %01.8f';
        }

        add_filter( 'wallets_sprintf_pattern_BTC', 'filter_wallets_sprintf_pattern_BTC' );

So you can use this filter in your theme or child theme to modify the pattern that amounts are shown for any currency. (Note that this filter has been re-implemented in the upcoming REST API in wallets6, so you can expect it to continue to work into the future.)

Hope this helps. Let me know if you encounter any diffculty implementing this solution.

with regards