WooCommerce Show Number Of Units Sold On Product Archive

WooCommerce archive showing the number of product units sold

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

Showing the number of units sold for products on the archive page is a great way to introduce Fear Of Missing Out (FOMO). It also gives your customers an indication of the most popular products in your store, perhaps influencing them to follow the crowd and pick the most popular product. 

				
					/**
 * Snippet Name:	WooCommerce Show Number Of Units Sold On Product Archive
 * Snippet Author:	ecommercehints.com
 */

add_action( 'woocommerce_after_shop_loop_item', 'ecommercehints_show_units_sold_product_archive' );
function ecommercehints_show_units_sold_product_archive() {
	global $product;
	echo '<br>' . $product->get_total_sales() . ' Units Sold';
}
				
			

Snippet Benefits

  • Introduce Fear Of Missing Out (FOMO).
  • Let customers know how many products have been sold from the product archive (category/shop) page.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

Your email address will not be published. Required fields are marked *

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers