KISS Coupon Cleanup
Automatically deletes expired WooCommerce coupons in batches via cron
by KISS Plugins · github.com/kissplugins/kiss-woo-coupon-auto-delete
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kissplugins/kiss-woo-coupon-auto-delete/archive/refs/heads/main.zipReadme
KISS Coupon Cleanup
A WordPress plugin that automatically deletes expired WooCommerce coupons.
What It Does
This plugin runs once per minute and automatically deletes expired coupons from your WooCommerce store in small batches (20 at a time). This prevents expired coupons from accumulating in your database.
How It Works
- Automatic Cleanup: Runs every minute via WordPress cron
- Batch Processing: Processes up to 20 expired coupons per run to avoid performance issues
- Simple Logic: If a coupon has an expiration date and it's expired, it gets deleted
- Logging: All deletions are logged using WooCommerce's built-in logger
Requirements
- WordPress 5.8 or higher
- WooCommerce 6.0 or higher
- PHP 7.4 or higher
Installation
- Upload the
neochrome-coupon-cleanupfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- That's it! The plugin starts working automatically
Configuration
The plugin works out of the box with these default settings:
- Batch Size: 20 coupons per minute
- Logging: Enabled (logs to WooCommerce logs)
To adjust these settings, edit the constants in neochrome-coupon-cleanup.php:
define( 'NCC_BATCH_SIZE', 20 ); // Coupons per run
define( 'NCC_ENABLE_LOGGING', true ); // Enable/disable logging
Viewing Logs
Deletion logs can be viewed in WooCommerce → Status → Logs. Look for logs with the source neochrome-coupon-cleanup.
What Gets Deleted
The plugin deletes:
- ✅ Any coupon with an expiration date that has passed
- ✅ All coupon types (fixed cart, percentage, etc.)
- ✅ Coupons created by any source (theme, plugin, admin)
The plugin does NOT delete:
- ❌ Coupons without expiration dates
- ❌ Coupons that haven't expired yet
Performance
The plugin is designed to be lightweight:
- Processes only 20 coupons per minute
- Uses efficient database queries
- Minimal server impact
- Works perfectly with WP Engine's cron system
Troubleshooting
Plugin not working?
- Make sure WooCommerce is installed and activated
- Check that WordPress cron is working (some hosts disable it)
- Review WooCommerce logs for any error messages
Want to verify it's running?
- Create a test coupon with an expiration date in the past
- Wait 1-2 minutes
- Check if the coupon was deleted
- Check WooCommerce logs for the deletion entry
Version
Current Version: 1.0.0
Author
Neochrome
License
This plugin is proprietary software.