What Does SafloLabs Sequential Order Numbers Do?
SafloLabs Sequential Order Numbers (v1.0.0) assigns strictly sequential, customizable order numbers to WooCommerce orders using atomic database locking. It supports 8 dynamic tokens ({YYYY}, {YY}, {MM}, {M}, {DD}, {HH}, {ORDER_ID}, {RAND4}), zero-padding up to 12 digits, separate counters for $0.00 free orders, scheduled Daily/Monthly/Yearly resets, On-Checkout or On-Paid trigger rules, case-insensitive [woocommerce_order_tracking] resolution, and a 50-order batch bulk backfill tool—with 0 KB of frontend CSS or JavaScript.
Atomic Race-Condition-Safe Counter
Serializes number allocation using MySQL GET_LOCK advisory locking with an atomic LAST_INSERT_ID() fallback and direct database existence checks—preventing duplicate numbers during flash sales and webhook bursts.
GET_LOCKZero DuplicatesHPOS Native
8 Dynamic Format Tokens & Padding
Build structured numbers like SFL-2026-01001 using clickable token chips for year, month, day, hour, internal order ID, or 4-character alphanumeric anti-enumeration codes, paired with 0–12 digit zero-padding.
{YYYY} {MM} {DD}{RAND4}0–12 Pad
Dedicated Free Order ($0.00) Sequence
Route $0.00 orders, free samples, and 100% coupon redemptions into an isolated counter with its own prefix (e.g. FREE-2026-0001), suffix, and padding so complimentary orders never dilute paid invoice sequences.
$0.00 IsolationSeparate Counter
On-Checkout or On-Paid Trigger Modes
Assign sequential numbers immediately upon checkout (Classic & Store API Block Checkout) or defer assignment until payment completes (processing, completed, on-hold) at priority 1 before customer emails send.
on_checkouton_paidSkips Drafts
Scheduled Daily, Monthly & Yearly Resets
Automatically restart sequences back to your configured starting number at midnight, on the 1st of every month, or on January 1st—protected by period-key tracking so mid-period setting edits never cause premature resets.
Daily / Monthly / Yearlywp_date()
HPOS & Legacy Order Tracking Lookup
Customers can track shipments on your [woocommerce_order_tracking] page using the full sequential number (with or without #, case-insensitive) or the raw WooCommerce ID, backed by direct indexed HPOS and postmeta SQL queries.
wc_orders_metaCase-Insensitive
1-Click Chronological Bulk Backfill
Retroactively assign sequential numbers to existing orders in chronological order using each order's original creation date. Processes 50 orders per Ajax batch with transient concurrency locks, live progress bar, and cancel support.
50-Order BatchesZero Timeout
Single-Order Metabox & Duplicate Guard
Inspect the internal WooCommerce ID alongside the formatted sequential number inside a dedicated side metabox on every order edit screen (HPOS & Legacy), with real-time duplicate collision prevention when overriding manually.
Manual OverrideCollision Check
WooCommerce Subscriptions Protection
Automatically intercepts subscription renewal and resubscribe order creation (HPOS & Legacy), strips cloned parent order number metadata, and assigns a fresh, unique sequential number to every recurring payment.
Renewal SafeResubscribe Safe
PDF Invoices & Packing Slips Sync
Automatically names downloaded WP Overnight PDF documents using your sequential number (e.g. invoice-SFL-2026-01001.pdf) and optionally synchronizes the PDF invoice number 1:1 across both v2 and v3+ releases.
Custom PDF FilenamesWPO v2 & v3+
REST API Exposure & JSON Config Backup
Exposes sfl_order_number and updates number inside /wp-json/wc/v3/orders responses for ERP and fulfillment syncs, plus 1-click JSON export/import to migrate rules and live counters between staging and live.
WC REST v3JSON Export/Import
Tracking Lookup Tester & Admin Search
Search orders by formatted sequential number directly from the WooCommerce Orders search box, and verify tracking resolution anytime using the built-in Order Tracking Lookup Tester and Recent Sequenced Orders audit table.
HPOS SearchBuilt-In Diagnostics