WooCommerce allows you to display in your online store the prices of the products with OR without taxes, but there is no option to display both, with AND without taxes.

This is very useful in many types of online stores, especially in those oriented to professionals and companies so why not incorporate this information in your Ecommerce?
To make WooCommerce show the prices of your products with and without taxes, you just have to add some code, this one:
/* Prices with AND without taxes */
add_filter( 'woocommerce_get_price_suffix', 'wphelp_prices_with_and_without_taxes', 99, 4 );
function wphelp_prices_with_and_without_taxes( $suffix, $product, $price, $qty ){
$suffix = ' <small>excluding TAX</small> - ' . wc_price( wc_get_price_including_tax( $product ) ) . ' <small>including TAX</small>';
return $suffix;
}
Code language: PHP (php)
What the code does is to add a suffix ($suffix;
) in which will go the price with tax and a text indicating it, so in the WooCommerce settings you must have previously activated the option to display prices without tax, like we saw in the screenshot above.
Save the changes and, if you have already applied the above code, you will go from seeing prices only without taxes, to also with taxes.


The code would be added easily following this guide.