Skip to main content Skip to footer
  • Home
  • About
  • Services
  • Work
    • Web Development
    • Portfolio
  • Contact
  • Blog
    • ACF
    • Beaver
      • Beaver Builder
      • Beaver Theme
      • Beaver Themer
    • Genesis
    • jQuery
    • macOS
    • WordPress
    • WooCommerce
  • Home
  • About
  • Services
  • Work
    • Web Development
    • Portfolio
  • Contact
  • Blog
    • ACF
    • Beaver
      • Beaver Builder
      • Beaver Theme
      • Beaver Themer
    • Genesis
    • jQuery
    • macOS
    • WordPress
    • WooCommerce

Make price in WooCommerce an absolute value

May 17, 2020| 0 comments

You can make the prices displayed in WooCommerce an absolute value and remove the decimal .00 places with the WooCommerce woocommerce_price_trim_zeros filter.

So for example to go from $50.00 to $50

In your functions.php add the following…

/**
 * WooCommerce
 * Trim zeros in price decimals
 **/
add_filter( 'woocommerce_price_trim_zeros', '__return_true' );

Related Posts

  • Cloudflare Custom Rules

    Block xmlrpc.php requests from Cloudflares firewall using Custom or Rate Limiting Rule

  • Cloudflare Fail2ban Serverpilot

    Syncing RunCloud and Cloudflare firewalls for fail2ban IPs

  • Cron Wordpress

    Set up WordPress cron to run via server cron in cPanel, Cloudways and RunCloud

  • Pre Get Posts Display

    Change Number of Posts Displaying on a Custom Post Type (CPT) Archive Page

  • Bricks Builder Menu Label

    Add Menu Label Text on Bricks Builder Nav Menu Element

  • Ajax Admin Woocommerce

    Check which plugins or processes are using high admin-ajax.php

  • valet-wordpress-development

    Set Up Valet on macOS for Local WordPress Development

  • Tweaking Runcloud Servers

    Tweaking RunCloud Servers After Deployment

Related Posts

  • Cloudflare Custom Rules

    Block xmlrpc.php requests from Cloudflares firewall using Custom or Rate Limiting Rule

  • Cloudflare Fail2ban Serverpilot

    Syncing RunCloud and Cloudflare firewalls for fail2ban IPs

  • Cron Wordpress

    Set up WordPress cron to run via server cron in cPanel, Cloudways and RunCloud

  • Pre Get Posts Display

    Change Number of Posts Displaying on a Custom Post Type (CPT) Archive Page

Leave the first comment (Cancel Reply)


  • Get Beaver Builder Now!
  • ACF apache archive beaver beaver builder beaver theme beaver themer bootstrap cache category checkout cpt css customizer filter flexbox form genesis header homebrew htaccess iconfonts image javascript jquery loop markup menu mysql php repeater runcloud search filter pro serverpilot shortcode slider taxonomy template twentytwelve ubuntu UI/UX while widget woocommerce wp-cli

  • Donate

    If you found something that helped you out and would like to make a donation, that's great, click below

  • PowerPack Beaver Builder Addon

Our location

We are based in the Northern Beaches of Sydney and work with both local and overseas based clients.

Check us out

Work with us

Let us know your website project requirements, see our services and use the contact form to get in touch to start the ball rolling.

  • Home
  • Blog
  • About
  • Services

© 2017 · NEIL GOWRAN · POWERED BY WORDPRESS, BRICKS, OPEN LITESPEED, CLOUDFLARE AND HOSTED ON RUNCLOUD AND RACKNERD