Add sale count next to star rating in woocommerce single product page

For single product page, I tested it with the themes: ShoppingCart and Storefront and it works fine :

in function.php:

function shoppingcart_setup(){

  add_filter('woocommerce_short_description', function(){
    
     global $product;
     $units_sold = $product->get_total_sales();
     if ( $units_sold ) return '<p>' . sprintf( __( 'Sold: %s', 'woocommerce' ), $units_sold ) . '</p>';             
        
  }, 10, 2);
}
add_action( 'after_setup_theme', 'shoppingcart_setup' );

Note: If you checked: Manage Stock, this code does not work