No permission to manage orders.';
return;
}
if (!class_exists('WooCommerce')) {
echo '
WooCommerce plugin not active.
';
return;
}
$limit = 5;
$args = [
'status' => 'on-hold',
'limit' => $limit,
'orderby' => 'date',
'order' => 'DESC',
];
$orders = wc_get_orders($args);
if (!$orders) {
echo 'No orders in on-hold status.
';
return;
}
echo '';
if (count($orders) >= $limit) {
$url = admin_url('admin.php?page=wc-orders&status=wc-on-hold');
echo '';
}
}
}