Product Archive, Product Page

WooCommerce Add Price Prefix

WooCommerce prices showing custom prefix text


There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About This Solution

This guide allows you to add custom text as a prefix to prices on both the product archive and single product templates. You may wish to highlight to customers information about prices and adding a prefix may be an ideal way to do this.

 * Snippet Name:	WooCommerce Add Prefix To Prices
 * Snippet Author:

add_filter( 'woocommerce_get_price_html', 'ecommercehints_add_prefix_to_prices', 10, 2 );
function ecommercehints_add_prefix_to_prices($price, $product) {
	$price = 'ONLY ' . $price;
    return $price;

Snippet Benefits

  • Add custom text prefixes to prices on the product archive and single product template

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 20% off on your first month with us.