Created
July 21, 2016 08:57
-
-
Save mikejolley/5aab2ec276906bc81a21ec6584d79c2d to your computer and use it in GitHub Desktop.
WooCommerce - Hide price suffix when product is not taxable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
All code does not work.