Product Page

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:

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.

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.