Created
November 25, 2019 22:47
-
-
Save cameronjonesweb/e46d532fed866b194da25ec5f4adb3d8 to your computer and use it in GitHub Desktop.
Round currency fields with Gravity Forms
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
add_filter( 'gform_currencies', 'cameronjonesweb_round_gravity_forms_currencies' ); | |
function cameronjonesweb_round_gravity_forms_currencies( $currencies ) { | |
foreach ( $currencies as $key => $val ) { | |
$currencies[ $key ]['decimals'] = 0; | |
} | |
return $currencies; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment