---
title: Tools and Diagnostics
description: "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 1. Go to **SC Discounts → Tools** in the WordPress admin menu ---…"
url: "https://webstepper.io/docs/smart-cycle-discounts/setting-configuration/tools-and-diagnostics/"
updated: "2026-02-17"
category: Setting Configuration
---

# Tools and Diagnostics

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

1. 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:

1. Click **"Clear Plugin Cache"**
2. Wait for confirmation
3. 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:

1. Ensure Debug Mode is enabled in Advanced Settings
2. Go to **SC Discounts → Tools → Debug Log**
3. 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:

1. Click **"Optimize Tables"**
2. Tables are analyzed and optimized
3. View results summary

### Repair Tables

Attempts to repair corrupted tables:

1. Click **"Repair Tables"**
2. System checks for and fixes issues
3. 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.

1. Click **"Analyze Native Discounts"** to preview affected products/variations.
2. Review the findings.
3. 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:

1. Click **"Export Campaigns"**
2. Choose what to include:
   - All campaigns
   - Active only
   - Select specific campaigns
3. Choose format (JSON)
4. Click **"Export"**
5. Download the export file

### Import Campaigns

Import previously exported campaigns:

1. Click **"Import Campaigns"**
2. Select your export file
3. Review campaigns to import
4. Choose import options:
   - Create as new campaigns
   - Overwrite existing (by name)
   - Skip duplicates
5. 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 campaign
- `wsscd_deactivate_campaign` - Deactivate/expire an ended campaign
- `wsscd_process_email_queue` - Send queued notifications
- `wsscd_auto_purge_trash` - Purge old trashed campaigns
- `wsscd_monitor_performance` - Run proactive performance checks

---

## Conflict Checker

### Check for Conflicts

Scan for potential campaign conflicts:

1. Click **"Check Conflicts"**
2. System analyzes all active and scheduled campaigns
3. 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:

1. Enter product ID or search by name
2. Click **"Test"**
3. 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:

1. Click **"Reset Settings"**
2. Confirm by typing "RESET"
3. All settings return to defaults
4. Campaigns and data are preserved

### Delete All Data

**Warning:** This permanently deletes all plugin data:

1. Click **"Delete All Data"**
2. Confirm by typing "DELETE ALL DATA"
3. All campaigns, analytics, and settings are removed
4. Cannot be undone

Use only if completely starting over or before uninstalling.
