Total : 0.00 €

Adding prefix/suffix to price in WooCommerce & WooPrice Calculator

If you would like to add prefix or suffix to your product price, you can use the the hook "woocommerce_get_price_html" as following:

function change_product_price_html($price){
	$newPrice 	 = "Text Before Price";
  	$newPrice 	.= $price;
  	$newPrice	.= "Text After Price";
	return $newPrice;
add_filter('woocommerce_get_price_html', 'change_product_price_html');

Of course, You need to replace "Text Before Price" and "Text After Price" strings (leaving the quotes).

To make it works you should append the code in your "/wp-content/themes/YOUR_THEME/functions.php"


Total : 0.00 €