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: Default timeframe for exchange chart

dashed-slug.net Forums Exchange extension support Default timeframe for exchange chart Reply To: Default timeframe for exchange chart

#11643
alexg
Keymaster

An alternative to the above would be to simply add the following in your child theme’s functions.php:

add_action(
	'wp_enqueue_scripts',
	function() {

		wp_add_inline_script(
			'wallets-exchange',
			<<<JS

				jQuery('html').on(
					'wallets_ready',
					function( event, coins, nonces ) {
						wp.wallets.viewModels.walletsExchangeChart.selectedTimeframe('1d');
					}
				);
JS
		);
	}
);

The JS characters must be the first characters on the line, because they close a heredoc string.