Code-Snippets-Functions/Execute a function on a child site/WooCommerce/display-prices-with-excluding-tax.txt

6 lines
321 B
Text

add_filter( 'woocommerce_get_price_suffix', 'wc_add_price_suffix_price_inc_tax', 99, 4 );
function wc_add_price_suffix_price_inc_tax( $suffix, $product, $price, $qty ){
$suffix = ' <small>ex. TAX</small> - ' . wc_price( wc_get_price_including_tax( $product ) ) . ' <small>inc. TAX</small>';
return $suffix;
}