Last active
June 15, 2024 07:31
-
-
Save pramodjodhani/3416535570e66680bf2e9e9272f13a7a to your computer and use it in GitHub Desktop.
Multi-currency for Gravity Forms (MCG) - allow functioning without OpenExchangeRates API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Multi-currency for Gravity Forms - allow without OpenExchangeRates API. | |
*/ | |
function gf_multi_currency_allow_without_exchange_rates_api() { | |
?> | |
<script> | |
if ( gform?.addFilter ) { | |
gform.addFilter( 'idea_mcg_exchange_rates', function() { | |
return { | |
rates: true, | |
} | |
} ); | |
} | |
</script> | |
<?php | |
} | |
add_action( 'wp_head', 'gf_multi_currency_allow_without_exchange_rates_api' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment