# Hide ".00" on Whole EDD Prices

> Shows whole prices such as 49 instead of 49.00 throughout Easy Digital Downloads, while prices like 49.50 keep their decimals.

- Type: PHP
- Runs: Run everywhere
- Category: [Easy Digital Downloads](https://wpide.com/library/category/edd/)
- Requires: Easy Digital Downloads
- Tags: edd, prices, formatting
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/edd-hide-zero-decimals/

## Code

```php
add_filter( 'edd_format_amount_decimals', function ( $decimals, $amount ) {
    return ( is_numeric( $amount ) && (float) $amount === floor( (float) $amount ) ) ? 0 : $decimals;
}, 10, 2 );
```

## Notes

Only the display changes; amounts are stored and charged exactly as before.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Hide ".00" on Whole EDD Prices" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
