Product Archive, Product Page

WooCommerce Add Price Suffix

WooCommerce prices showing custom suffix text

Pre-Requisites

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 snippet allows you to add custom content as a suffix to WooCommerce prices. You may wish to display information regarding tax, a product’s status, whether it’s used or new etc. The possibilities are endless!

/**
 * Snippet Name:	WooCommerce Add Suffix To Prices
 * Snippet Author:	ecommercehints.com
 */

add_filter( 'woocommerce_get_price_html', 'ecommercehints_add_suffix_to_prices', 10, 2 );
function ecommercehints_add_suffix_to_prices($price, $product) {
	$price =  $price . " (used)";
    return $price;
}

Snippet Benefits

  • Add and display any custom text as a suffix 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 10% off on your first month with us.

26027
WELCOME OFFER