Last active
December 28, 2015 11:19
-
-
Save amdrew/7493010 to your computer and use it in GitHub Desktop.
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
| <?php | |
| // set decimal places to 8 | |
| function my_child_theme_edd_format_amount_decimals( $decimal_places ) { | |
| return 8; | |
| } | |
| add_filter( 'edd_format_amount_decimals', 'my_child_theme_edd_format_amount_decimals' ); | |
| // format final amount with (float) | |
| function my_child_theme_edd_format_amount( $formatted, $amount, $decimals, $decimal_sep, $thousands_sep ) { | |
| return (float) $formatted; | |
| } | |
| add_filter( 'edd_format_amount', 'my_child_theme_edd_format_amount', 10, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment