add_action( 'woocommerce_after_shop_loop_item', 'wpm_product_sold_count', 11 );
function wpm_product_sold_count() {
global $product;
$units_sold = $product->get_total_sales();
if ($units_sold > 5) {
echo '<p class="sold-product">' . sprintf( __( 'Produit vendu: %s fois', 'woocommerce' ), $units_sold ) . '</p>';
}
}