Product Archive

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.

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.

26027
WELCOME OFFER