WooCommerce Show Number Of Units Sold On Product Page

WooCommerce product page showing the number of units sold for each product


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 product units sold on the single product page is a great way to introduce Fear Of Missing Out (FOMO). You can highlight how many products are sold to let customers know a product’s popularity. This particular solution shows the number of products sold under the add to cart button, somewhere the customer is bound to see it.

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

add_action( 'woocommerce_after_add_to_cart_button', 'ecommercehints_show_units_sold_product_page' );
function ecommercehints_show_units_sold_product_page() {
	global $product;
	echo '<br>Units Sold: '. $product->get_total_sales();

Snippet Benefits

  • Introduce Fear Of Missing Out (FOMO).
  • Let customers know how many products have been sold on the product 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