Skip to content

Instantly share code, notes, and snippets.

@atikju
Forked from mikejolley/functions.php
Created October 13, 2016 04:13
Show Gist options
  • Save atikju/54b91c249e97f028da133e8687702556 to your computer and use it in GitHub Desktop.
Save atikju/54b91c249e97f028da133e8687702556 to your computer and use it in GitHub Desktop.
WooCommerce - Hide price suffix when product is not taxable.
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_filter( 'woocommerce_get_price_suffix', 'custom_woocommerce_get_price_suffix', 10, 2 );
function custom_woocommerce_get_price_suffix( $price_display_suffix, $product ) {
if ( ! $product->is_taxable() ) {
return '';
}
return $price_display_suffix;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment