Site logo

Archived topic

Vat tax displayed on product page

5 replies · Started by _blank on March 14, 2020

Viewing posts 1–6 of 6

Hi there,

the correct way would be to ensure that Woo is actually displaying the correct pricing inclusive of VAT and exclusive of shipping etc. - and then some custom development to display that - which you would need to speak with the Woo plugin author or a developer about.

If however you simply want to add that text as a suffix then you can add this PHP snippet to your site:

add_filter( 'woocommerce_get_price_suffix', 'db_woo_single_product_price_suffix', 99, 4 );
  
function db_woo_single_product_price_suffix( $html, $product, $price, $qty ){
	// Check if producr is single
	if ( ! is_product() ) {
		return $html;
	} else {
		$price_suffix = '<span class="price-suffix"> incl. vat excl. shipping</span>';
	    $html .= $price_suffix;
    	return $html;
	}
}

Let us know if the above works for you and if we can help tweak or style the output.

thank you so much. woocommerce said its linked to my theme.
Unfortunately it shows this error: http://prnt.sc/rgdccb
Thanks again
best Hannah

Ah wonderful. Thank you so much :)

Glad we could be of help

This archived topic is closed to new replies.