WordPress filter hook
woocommerce_price_trim_zeros
Defined by WooCommerce and fired by 79 plugins in total, running on 8.2M+ sites between them.
“WooCommerce core filter: Filters whether to trim trailing zeros from prices.”
How to use woocommerce_price_trim_zeros
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_price_trim_zeros', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
79 plugins that fire woocommerce_price_trim_zeros
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/wc-formatting-functions.php:646 -
YITH WooCommerce Wishlist400,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Compare100,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
Customer Reviews for WooCommerce80,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/emails/class-cr-email-func.php:238 -
YITH WooCommerce Quick View80,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Ajax Product Filter70,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Catalog Mode60,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
FOX50,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )classes/woocs.php:4114 -
Advanced Product Fields (Product Addons) for WooCommerce50,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/classes/class-woocommerce-service.php:162 -
YITH WooCommerce Ajax Search30,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
WPC Product Bundles for WooCommerce30,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-woosb.php:188 -
CURCY20,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugins/learnpress.php:325 -
YITH WooCommerce Product Add-Ons20,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
FunnelKit Automations20,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-bwfan-common.php:11435 -
Product Table & List Builder for WooCommerce10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )main.php:2907 -
Tiered Pricing Table for WooCommerce10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )src/Addons/QuickOrder/QuickOrderDisplay.php:173 -
YITH WooCommerce Product Gallery & Image Zoom10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH Request a Quote for WooCommerce10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Badge Management10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Gift Cards10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
WPC Frequently Bought Together for WooCommerce10,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-woobt.php:231 -
YITH Infinite Scrolling9,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
WPC Composite Products for WooCommerce9,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-wooco.php:276 -
YITH Color and Label Variations for WooCommerce8,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Brands Add-On8,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH Frequently Bought Together for WooCommerce7,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
WC Fields Factory7,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/wcff_injector.php:703 -
YITH WooCommerce Order & Shipment Tracking6,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Subscription6,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Affiliates6,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH Pre-Order for WooCommerce5,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
Coupon Affiliates5,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )inc/functions/functions-calculate-order.php:2738 -
YITH Essential Kit for WooCommerce #14,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
WPC Product Options for WooCommerce4,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-frontend.php:166 -
YITH WooCommerce Product Slider Carousel4,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
Caddy3,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-caddy-block.php:224 -
Custom Price for WooCommerce3,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', \false )vendor_prefixed/wpdesk/custom-price-for-woocommerce-core/src/Display.php:120 -
Thanko Thank You Page Customizer for WooCommerce3,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )frontend/account.php:195 -
YITH WooCommerce Tab Manager3,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Product Bundles3,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Waitlist2,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
YITH WooCommerce Featured Video2,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
WPC Grouped Product for WooCommerce2,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-woosg.php:901 -
YITH WooCommerce Popup2,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
Coupzy Coupon Box for WooCommerce1,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )admin/admin.php:120 -
Lucky Wheel for WooCommerce1,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )admin/admin.php:119 -
WPC Price by Quantity for WooCommerce1,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-frontend.php:92 -
Multi Currency, Currency Switcher, Exchange Rates for WooCommerce1,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )lib/Price_Manager.php:119 -
YITH PayPal Express Checkout for WooCommerce1,000+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/yit-functions.php:995 -
CoCart900+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/cocart-rest-functions.php:362 -
Sublium Subscriptions700+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/abstracts/mergetags.php:221 -
WPSyncSheets For WooCommerce600+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/product/compatibility/class-wpsslw-default-headers.php:147 -
CommerceBird400+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )vendor-prefixed/woocommerce-b2b/includes/wcb2b-pluggable-functions.php:428 -
Opal Woo Custom Product Variation300+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/classes/class-owcpv-frontend.php:119 -
Advanced Product Information for WooCommerce200+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )frontend/coupon.php:133 -
FriendStore for WooCommerce100+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/helper.php:585 -
Splitit for WooCommerce90+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )splitIt-flexfields-payment-gateway.php:7362 -
WooReports60+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/functions-wr-public.php:15 -
OpenPOS Lite50+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )lib/class-op-woo.php:5017 -
SMM API40+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/smm-functions.php:901 -
SCM40+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )scd_renders.php:594 -
Wallet Ready Gift Cards for WooCommerce by GiftRocketWP40+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/database-functions.php:110 -
Realty Portal30+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-payment.php:625 -
TABLEiT20+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )front-scripts.php:694 -
Ultimate Integration for Telegram20+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )ultimate-integration-for-telegram.php:241 -
U2Code Product Addons for WooCommerce10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )src/Frontend/Frontend.php:100 -
Profitblue10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )src/Helpers/Helper.php:152 -
EdgeTariff10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-edtcs.php:1202 -
WebStyle Hotel Booking for WooCommerce10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-cnwshotel-price-format.php:49 -
Currency Switcher for WooCommerce10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-acowcs-public.php:657 -
ShapedRecommend10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )src/Admin/App.php:198 -
Rooster One10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/dmm/services/class-aieo-dmm-bundle-card.php:311 -
SCD10+ installs
apply_filters( 'woocommerce_price_trim_zeros', false )scd_multivendors_renders.php:290 -
SCMFewer than 10 installs
apply_filters( 'woocommerce_price_trim_zeros', false )scd_wcv_multivendor.php:269 -
Renidev Bundle Composer for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/class-renidev-bundle-front.php:158 -
Syzenlabs Easy Min MaxFewer than 10 installs
apply_filters( 'woocommerce_price_trim_zeros', false )includes/frontend/class-frontend.php:640 -
InflyFewer than 10 installs
apply_filters( 'woocommerce_price_trim_zeros', false )ignite.php:322 -
D7SMS for WoocommerceFewer than 10 installs
apply_filters( 'woocommerce_price_trim_zeros', false )plugin-fw/d7-functions.php:648 -
SCDFewer than 10 installs
apply_filters( 'woocommerce_price_trim_zeros', false )scd_multivendors_renders.php:1066
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.