Tools and Diagnostics
3 min read
The Tools page provides diagnostic utilities, maintenance functions, and troubleshooting aids to help you manage Smart Cycle Discounts effectively and resolve issues quickly.
Accessing Tools #
- Go to SC Discounts → Tools in the WordPress admin menu
System Status #
Health Check #
The system status section shows the overall health of the plugin:
| Check | What It Verifies |
|---|---|
| WordPress Version | Running WordPress 6.4 or higher |
| WooCommerce Version | Running WooCommerce 8.0 or higher |
| PHP Version | Running PHP 7.4 or higher |
| Database Tables | All required tables exist and are accessible |
| WP-Cron | Cron system is functioning |
| Action Scheduler | WooCommerce Action Scheduler available |
| Memory Limit | Sufficient PHP memory available |
| Cache System | Caching is operational |
Status Indicators #
- ● Green: Component is working correctly
- ● Yellow: Warning – may affect performance
- ● Red: Error – requires attention
Run Health Check #
Click “Run Health Check” to refresh all status checks.
Cache Management #
Clear Plugin Cache #
Clears all cached campaign and product data:
- Click “Clear Plugin Cache”
- Wait for confirmation
- All pricing and campaign data will be recalculated on next request
When to Clear Cache #
- Campaign changes aren’t appearing on frontend
- Prices seem incorrect
- After bulk product updates
- After importing/exporting campaigns
- After updating the plugin
Cache Statistics #
View current cache status:
- Cache hits/misses
- Cache size
- Last cleared timestamp
Debug Log #
Viewing Logs #
Access debug logs when troubleshooting:
- Ensure Debug Mode is enabled in Advanced Settings
- Go to SC Discounts → Tools → Debug Log
- View recent log entries
Log Filtering #
| Filter | Description |
|---|---|
| Level | Show only errors, warnings, or all |
| Date Range | Filter by date |
| Search | Search log content |
| Component | Filter by system component |
Log Actions #
- Download Log: Export as text file for sharing with support
- Clear Log: Delete all log entries
- Copy Entry: Copy specific log entry to clipboard
Database Tools #
Optimize Tables #
Optimizes plugin database tables for better performance:
- Click “Optimize Tables”
- Tables are analyzed and optimized
- View results summary
Repair Tables #
Attempts to repair corrupted tables:
- Click “Repair Tables”
- System checks for and fixes issues
- Reports success or errors
Verify Integrity #
Checks data integrity across plugin tables:
- Orphaned records
- Invalid references
- Missing required data
Native Discount Reset (WooCommerce) #
Safely clean up WooCommerce native sale metadata that may conflict with campaign pricing.
- Click “Analyze Native Discounts” to preview affected products/variations.
- Review the findings.
- Click “Reset Native Discounts” to execute cleanup and restore regular pricing metadata paths.
Use this when: products are stuck with old sale metadata or native sales conflict with campaign pricing behavior.
Import/Export #
Export Campaigns #
Export campaigns for backup or migration:
- Click “Export Campaigns”
- Choose what to include:
- All campaigns
- Active only
- Select specific campaigns
- Choose format (JSON)
- Click “Export”
- Download the export file
Import Campaigns #
Import previously exported campaigns:
- Click “Import Campaigns”
- Select your export file
- Review campaigns to import
- Choose import options:
- Create as new campaigns
- Overwrite existing (by name)
- Skip duplicates
- Click “Import”
What Gets Exported #
- Campaign settings and configuration
- Product selection rules
- Discount configurations
- Schedule settings
- Conditions and exclusions
What Doesn’t Export #
- Analytics data
- Campaign IDs (new IDs assigned on import)
- Product IDs (matched by SKU on import)
Scheduled Tasks #
View Scheduled Tasks #
See all pending scheduled actions:
| Column | Description |
|---|---|
| Hook | The action being scheduled |
| Status | Pending, Running, Complete, Failed |
| Scheduled | When the task will run |
| Campaign | Related campaign (if applicable) |
Task Actions #
- Run Now: Execute a pending task immediately
- Cancel: Remove a pending task
- Retry: Retry a failed task
Common Scheduled Tasks #
wsscd_activate_campaign– Activate a scheduled campaignwsscd_deactivate_campaign– Deactivate/expire an ended campaignwsscd_process_email_queue– Send queued notificationswsscd_auto_purge_trash– Purge old trashed campaignswsscd_monitor_performance– Run proactive performance checks
Conflict Checker #
Check for Conflicts #
Scan for potential campaign conflicts:
- Click “Check Conflicts”
- System analyzes all active and scheduled campaigns
- Results show any overlapping product/date combinations
Conflict Report #
Potential Conflicts Found: 2 CONFLICT 1: Campaign A: "Summer Sale" (Priority: 3) Campaign B: "Category Discount" (Priority: 3) Overlapping Products: 25 items Date Overlap: Jun 1 - Jun 15 CONFLICT 2: Campaign A: "Flash Sale" (Priority: 5) Campaign B: "Member Discount" (Priority: 2) Overlapping Products: 10 items Resolution: Flash Sale wins (higher priority)
Resolving Conflicts #
- Adjust campaign priorities
- Modify product selections to reduce overlap
- Adjust campaign schedules
Test Campaign #
Test a Product #
Check how campaigns affect a specific product:
- Enter product ID or search by name
- Click “Test”
- See which campaigns apply and resulting price
Test Result Example #
Product: Blue Widget (ID: 123) Regular Price: $50.00 Matching Campaigns: 1. "Summer Sale" - 20% off → $40.00 (Priority: 3) 2. "Category Discount" - 10% off → $45.00 (Priority: 2) Winner: "Summer Sale" (highest priority) Final Price: $40.00 Discount Applied: $10.00 (20%)
System Information #
Environment Details #
Technical information for troubleshooting:
| Information | Example |
|---|---|
| Plugin Version | 1.0.0 |
| WordPress Version | 6.4.2 |
| WooCommerce Version | 8.4.0 |
| PHP Version | 8.1.12 |
| MySQL Version | 8.0.32 |
| Server Software | nginx/1.24.0 |
| PHP Memory Limit | 256M |
| Max Execution Time | 300 seconds |
| Active Theme | flavor 3.2.0 |
Copy System Report #
Click “Copy System Report” to copy all technical details for sharing with support.
Danger Zone #
Reset Plugin #
Reset all settings to defaults:
- Click “Reset Settings”
- Confirm by typing “RESET”
- All settings return to defaults
- Campaigns and data are preserved
Delete All Data #
Warning: This permanently deletes all plugin data:
- Click “Delete All Data”
- Confirm by typing “DELETE ALL DATA”
- All campaigns, analytics, and settings are removed
- Cannot be undone
Use only if completely starting over or before uninstalling.