Displays monthly sales of a WooCommerce product (last 30 days)

SIP Social Proof

Shortcode: [monthly_sales]

Variables accepted:

  • id: the ID of the WooCommerce product you want to display stats for. To be used when you write the shortcode in a post or page (not inside the shop pages or single product text boxes in plugin settings).
  • singular: word to use when output is 1. Example singular="time".
  • plural: word to use when output higher than 1. Example plural="times".
  • animation: animate the stats counter. Default is animation=”false”.
  • multiplier: Multiply the output by any number. Example multiplier="3.5"
  • hide_bellow: hide the shortcode output if the shortcode value is smaller than the one specified. Example hide_bellow="10" -> If the original output is bellow 10, then shortcode output is hidden.
  • value_bellow: substitute the shortcode output with a certain number if the shortcode value is smaller than the one specified. Example value_bellow="10,45" -> output “45” if the original value is under “10”.
  • random(X,Y): Choose a random number between X and Y, to be used inside another variable. Example value_bellow="10,random(10,30)" -> If the original output is bellow 10, then substitute with a random number between 10 and 30.

This product was bought [monthly_sales ID="123" singular="time" plural="times"] in the last 24 hours! Hurry while stock last!


This product was bought 63 times in the last 30 days! Hurry while stock last!


[monthly_sales ID="123" singular="time" plural="times" animation="true" value_bellow="10,random(10,30)" multiplier="3"]

Will display sales for product ID 123 in the last 30 days, with animated counter, substitute output with a value between 10 and 30 if the value is under 10 and multiply output by 3 if the value is over 10.