Total : 0.00 €

Adding prefix/suffix to price in WooCommerce & WPC

If you would like to add prefix or suffix to your product price, you can use 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 work, you must append the code to your "/wp-content/themes/YOUR_THEME/functions.php" file.

Cart

Total : 0.00 €