Skip to content

Instantly share code, notes, and snippets.

@pramodjodhani
Last active June 15, 2024 07:31
Show Gist options
  • Save pramodjodhani/3416535570e66680bf2e9e9272f13a7a to your computer and use it in GitHub Desktop.
Save pramodjodhani/3416535570e66680bf2e9e9272f13a7a to your computer and use it in GitHub Desktop.
Multi-currency for Gravity Forms (MCG) - allow functioning without OpenExchangeRates API.
<?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