Vanhoyte

Auto Draft Out of Stock WooCommerce Products

Repository

Released On:

September 27, 2025

Automatically sets WooCommerce products to “Draft” status when their stock reaches zero. Includes a manual admin page to run cleanup.

Features

  • Automatic Drafting: After checkout, any product in the order with zero stock is set to draft.
  • Manual Cleanup: Admin page to scan all products and draft any that are out of stock.

Installation

  1. Download or clone this repository.
  2. Upload auto-draft-out-of-stock.php to your WordPress site’s wp-content/plugins/ directory.
  3. Activate the plugin from the WordPress admin panel.

Usage

  • Products will be automatically set to draft after checkout if their stock is zero.
  • To manually run the cleanup, go to the WordPress admin menu and select Out of Stock Draft. Click the button to scan and draft all out-of-stock products.

Requirements

  • WordPress with WooCommerce installed and active.
  • User must have manage_woocommerce capability to access the admin page.

License

GPL v2 or later. See LICENSE.

Author

Vanhoyte