<?php
$auctions = wc_get_products([
    'author' => get_current_user_id(),
    'type'   => 'auction',
    'limit'  => -1,
]);

$total = count($auctions);
$active = count(array_filter($auctions, fn($p) =>
    get_post_meta($p->get_id(), '_stakmv_auction_status', true) === 'active'
));
?>

<h2>Statistics</h2>
<ul>
    <li>Total Auctions: <?= $total ?></li>
    <li>Active Auctions: <?= $active ?></li>
</ul>

<div id="mv-chart"></div>
