• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

How to remove decimals from the price in Easy Digital Downloads

Learn in this tutorial how to remove decimals from Easy Digital Downloads (EDD) prices using code.

By default, Easy Digital Downloads displays the price with two decimals.

EDD default prices
EDD default prices

But in some cases you may prefer to use round numbers, without any decimals.

EDD prices without decimals
EDD prices without decimals

Interested? Here’s how to display prices without decimals:

Snippet to remove decimals from the price in Easy Digital Downloads

Add the following code at the end of functions.php or in your functionality plugin:

To see this and another 847 code snippets of this website, login or subscribe here.

It’s as simple as that.

Thanks to this snippet you can further simplify the pricing of your products or downloads in EDD:

EDD prices without decimals
EDD prices without decimals

Conclusions

Do you want to remove the decimals from Easy Digital Downloads prices? Now you know how to do it easily with code.

If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.

Benefits of being a subscriber. 🙂

CPT Easy Digital Downloads PHP

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?