Created
September 15, 2015 15:12
-
-
Save mindctrl/df17d2ff961523cbb45f to your computer and use it in GitHub Desktop.
Easy Digital Downloads - Set the number of decimals to zero for certain currencies
This file contains hidden or 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
| function jp_no_krw_decimal( $decimals, $currency ) { | |
| if ( 'KRW' == $currency ) { // Korean Won. Set to your currency code. | |
| return 0; | |
| } | |
| return $decimals; | |
| } | |
| add_filter( 'edd_currency_decimal_count', 'jp_no_krw_decimal', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment