Display prices with and without taxes in WooCommerce

Display prices with and without taxes in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

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;
}
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.