A simple, powerful and independent e-commerce platform.
Sell anything with ease.

Add custom prefix to prices

You can add a prefix to all prices with this code. For example, you could add “Only” before the price.

		/**
 * Add prefix to prices
 */

add_filter('woocommerce_get_price_html', 'cc_add_price_prefix', 99, 2);

function cc_add_price_prefix($price, $product) {

  $price = 'Only ' . $price;
  return $price;

}
	
View Raw Code ID: 9915