Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @masudrumii, you can add below code into your theme functions.php:

    function tt_show_product_loop_unitsold() {
      global $product;
      $units_sold = get_post_meta( $product->id, 'total_sales', true );
    
      echo '<p>' . sprintf( __( 'Units Sold: %s', 'woocommerce' ), $units_sold ) . '</p>';
    }
    
    add_action( 'woocommerce_single_product_summary',  'tt_show_product_loop_unitsold', 8 );
    Thread Starter masudrumii

    (@masudrumii)

    Thanks @terrytsang.
    It’s working..

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Product Sold Quantity’ is closed to new replies.