dashed-slug.net › Forums › Exchange extension support › Default timeframe for exchange chart › Reply To: Default timeframe for exchange chart
April 4, 2022 at 9:31 am
#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.