Created
January 19, 2023 12:33
-
-
Save rubelmiah/c1e4bf1ae0b34846af849d4c682455e6 to your computer and use it in GitHub Desktop.
Remove zero cents ".00" from Easy Digital Downloads.
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 | |
function rm_edd_format_amount_decimals( $decimals, $amount ) { | |
if ( floor( $amount ) == $amount ) | |
$decimals = 0; | |
return $decimals; | |
} | |
add_filter( 'edd_format_amount_decimals', 'rm_edd_format_amount_decimals', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment