• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

OrganicWeb

Marketing Strategy Facilitators & Mailchimp Pro Partners

  • Home
  • Marketing Strategy & Planning
  • Mailchimp Services
    • Service Catalogue
    • Mailchimp Improvement Audit
    • Shopify & WooCommerce Marketing
    • Mailchimp Online Courses (on Udemy)
    • Mailchimp Live Classes
    • Mailchimp Corporate/Team Training
    • Consulting
  • Free Tools
    • 5 day Mailchimp marketing boost
    • Map maker for email
    • Is Mailchimp down?
    • Marketing facts and stats.
  • Content
    • Blog
    • Videos
  • Contact & About
You are here: Home / WordPress / How to remove cents in Gravity Forms prices

How to remove cents in Gravity Forms prices

Behavioural economics teaches us that people are more prone to purchase when prices are in a round amount with fewer numbers. For example, showing a price of $190 will result in more sales than displaying $190.00. All good and well but how do we do this when we use Gravity Forms with WordPress. The price field options allow for neither rounding nor displaying prices with zero decimal places (i.e. remove showing the cents in the price).

The answer lies in manipulating the Gravity Forms defaults for our chosen currency (in my case I use Australian dollars).

How to display whole dollar prices only

To display prices without the cents field on your Gravity Form fields merely add the following to your WordPress functions.php file:

add_filter( 'gform_currencies', 'update_currency' );
function update_currency( $currencies ) {
$currencies['AUD'] = array(
'name' => __( 'Australian Dollar', 'gravityforms' ),
'symbol_left' => '$',
'symbol_right' => '',
'symbol_padding' => ' ',
'thousand_separator' => ',',
'decimal_separator' => '.',
'decimals' => 0
);

return $currencies;
}

In the code above you’ll need to change the references to AUD and Australian Dollar to your currency needs. You’ll also need to amend the symbol_left value as appropriate. Below is a table of currency names and three letter abbreviations as included with Gravity Forms by default.

Currency name Abbreviation Symbol
Australian Dollar AUD $
Brazilian Real BRL R$
Canadian Dollar CAD $
Czech Koruna CKZ Kč
Danish Krone DKK kr.
Euro EUR €
Hong Kong Dollar HKD HK$
Hungarian Forint HUF Ft
Israeli New Sheqel ILS ₪
Japanese Yen JPY ¥
Malaysian Ringgit MYR RM
Mexican Peso MXN $
Norwegian Krone NOK Kr
New Zealand Dollar NZD $
Philippine Peso PHP Php
Polish Zloty PLN zł
Pound Sterling GBP £
Russian Ruble RUB pyб
Singapore Dollar SGD $
South African Rand ZAR R
Swedish Krona SEK Kr
Swiss Franc CHF Fr.
Taiwan New Dollar TWD $
Thai Baht THB ฿
U.S. Dollar USD $

Found this useful? Please share:

Filed Under: WordPress

Watch Gary in action

Gary frequently adds Mailchimp instructional videos to his YouTube channel. Subscribe to keep updated.

→  Subscribe   ←

How to create a lead-capture form with file download.

How to target your most engaged Mailchimp contacts.

Reader Interactions

Comments

  1. pphant says

    September 29, 2015 at 8:36 am

    This looked, great, I added this to my theme function.php and it worked, however for some reason it added $15 to the total? Why is that, I can’t see anything in the code that does it.

    Reply
    • pphant says

      September 30, 2015 at 8:47 am

      I apologise, I later discovered I was having trouble with a plug-in. It caused other glitches and I removed it. So I decided to try this again and it works wonderfully. If you ever figure out a way to round up though would be awesome!
      Thanks!

      Reply
  2. abel says

    January 5, 2017 at 2:01 am

    This won’t work with the Stripe addon for GF, I tried but apparently Stripe needs decimals to work 🙁 any solutions?

    Reply
  3. Cameron Schuyler says

    December 16, 2020 at 7:26 am

    How can I target a specific field with this method?

    Reply

Leave a Reply Cancel reply

Primary Sidebar

Ready? Boost your marketing …

Get Started

Learn from a Mailchimp Pro Partner

Signup to receive info about Gary's Mailchimp beginner and advanced classes.

Sign up

Gary on Australian National Radio

Changes are coming to the Australian Spam Act

Read Gary's article in SmartCompany

Mailchimp Video Tutorials

Meet Gary, Mailchimp Expert

Gary is a Mailchimp Expert and Partner. He delivers Mailchimp training and consulting services in Australia, New Zealand and Singapore. Gary presents at Mailchimp events and hosts the first, and only, Australian Mailchimp sponsored event. He is M.B.A. qualified from Henley Business School, U.K.

Contact Gary for your Mailchimp needs

Footer

Customer ratings

Mailchimp pro partners

Contact

Contact Gary for all your Mailchimp training, consulting and integration needs.

Contact Gary.

Copyright © 2021 · Sitemap · ABN: 40800872179 · Privacy Policy · Terms of Service