SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Show product sold count
  2. add_action( 'woocommerce_single_product_summary', ‘claue_product_sold_count', 11 );
  3. function  claue_product_sold_count() {
  4.    global $product;
  5.    $units_sold = $product->get_total_sales();
  6.    if ( $units_sold ) echo '<p>' . sprintf( __( 'Sold: %s', ‘claue' ), $units_sold ) . '</p>';
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top