Directory / plugin

SazCancel – Auto-Cancel On-Hold Orders

v1.0.0 · by alexsazonov

Automatically cancel abandoned On-Hold orders (BACS, check, offline invoices) under merchant-defined rules to release stuck inventory.

View on WordPress.org

About this plugin

Tired of abandoned On-Hold orders indefinitely blocking your product inventory?

In WooCommerce Core, the built-in Hold stock (minutes) setting only applies to “Pending payment” orders. When customers order via Direct Bank Transfer (BACS), Cheque, or offline invoices, the order is placed in On-Hold status and stock is deducted from your shelves. If the customer never pays, the order sits in your store forever — keeping products in a false “Out of Stock” state and costing you sales.

SazCancel solves this exact gap. It safely and automatically cancels stale On-Hold orders after your chosen delay (e.g., 48 hours or 3 days), allowing WooCommerce Core to natively restock your products.

🛡️ Built for Merchant Safety (Zero-Disaster Guard)

SazCancel is built on strict safeguards to protect merchant orders and store inventory:

  • Simulation Mode (Dry Run) Enabled by Default: Upon installation, Dry Run is ON. SazCancel simulates the process, calculating how many orders and stock units would be released, recording events into an Activity Log without modifying real orders.
  • Eligible Gateways Whitelist: You decide which payment methods are subject to auto-cancellation (e.g. BACS and Cheque). Orders from PayPal, Stripe, COD, or other gateways are never touched.
  • Precise On-Hold Age Tracking: SazCancel measures order age strictly from the exact moment the order entered On-Hold status (not from creation date). If a manager temporarily toggled an order to On-Hold 10 minutes ago, it won’t be prematurely cancelled!
  • Last-Moment Status Revalidation: Before executing cancellation, SazCancel revalidates the order in real time. If the order was paid or moved to Processing or Completed, the job immediately exits.
  • Safe Legacy Recovery Baseline: Old On-Hold orders placed prior to plugin installation receive a fresh, full grace period from the moment they are first detected. No sudden cancellations!
  • Native WooCommerce Restock: SazCancel lets WooCommerce Core handle stock restoration via $order->update_status('cancelled'). The core wc_maybe_increase_stock_levels() function safely returns the exact items back to stock.
  • Action Scheduler Event Queue: Powered by WooCommerce’s native Action Scheduler with duplicate job prevention (unique = true). No heavy cron database scans.
  • Activity Audit Log: See the last 30 automated events, cancellations, and simulations right on your settings screen.
  • 100% HPOS Native: Fully compatible with High-Performance Order Storage (custom_order_tables) and Cart/Checkout Blocks.
  • 100% On-Premise PHP: Self-contained code with zero external tracking, no third-party APIs, and no subscriptions.

Plugin tags