<?php
if (!defined('ABSPATH')) exit;

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- Legacy invoice numbering API kept for backward compatibility.
function asp_get_next_invoice_number() {
    $n = (int) get_option('asp_invoice_number', 1000);
    update_option('asp_invoice_number', $n + 1);
    return $n;
}
