# Aegilock Transaction Guardian for WooCommerce v1.0.21

Advanced transaction security for WooCommerce stores with optional ML-powered order screening, real-time protection, and intelligent risk assessment.

## Latest Update v1.0.21 - Improved Fraud Detection Logic

Improved fraud detection logic for better accuracy

## Key Features

### Fraud Detection
- Real-time order analysis
- Email pattern detection
- Country risk assessment
- Customer history review
- Payment method validation
- Behavioral pattern analysis

### Security Features
- Email blacklist management with wildcard support
- Multi-factor customer validation
- Configurable risk thresholds
- Admin security dashboard
- Email threat alerts

## Installation

1. Upload the plugin files to `/wp-content/plugins/aegilock-transaction-guardian-for-woocommerce/`
2. Activate the plugin through the WordPress plugins screen
3. Navigate to WooCommerce → Settings → Aegilock to configure

## Configuration

### Basic Settings
- **Enable Fraud Detection**: Turn on/off the fraud detection system
- **Test Mode**: Enable for testing (orders won't be blocked)
- **Fraud Threshold**: Set the risk threshold (0.1 - 1.0)

### Actions
- **Block High Risk Orders**: Automatically set high-risk orders to "failed"
- **Hold Medium Risk Orders**: Set medium-risk orders to "on-hold"
- **Email Alerts**: Receive notifications for flagged orders

### Blacklist Management
- **Email Blacklist**: Block specific emails or entire domains with wildcard support
  - Exact matches: `spammer@example.com`
  - Domain wildcards: `*@spam.com`
  - Pattern matching: `trouble.*@*`
- **Country Blacklist**: Orders from these countries are flagged

### Other Controls
- **Order Amount Limits**: Set minimum/maximum order values

## Testing

The plugin includes a built-in testing system:


## Dashboard

Access the security dashboard at **WooCommerce → Aegilock Security**:

## Security Features

### Fraud Detection
- **Email blacklist management** - Block specific emails or domains with wildcard support
- **Email pattern analysis** - Detects suspicious email addresses
- **Country risk assessment** - Geographic fraud indicators
- **Order amount analysis** - Unusual purchase patterns
- **Customer history review** - Trust level calculation
- **Payment method validation** - Risk-based on payment types

### Trusted Customer System
- Multi-factor validation
- Account age verification
- Purchase history analysis
- Configurable trust thresholds

## Migration from Previous Versions

Version 1.0.12 maintains backward compatibility with previous versions. The new architecture runs alongside legacy code to ensure smooth operation.

### Database Migration
- Existing fraud logs are preserved
- Statistics continue from previous versions
- Settings are automatically migrated

## Changelog

### v1.0.21 - Improved Fraud Detection Logic
- IMPROVED: Fraud detection logic

### v1.0.20 - Fraud Checks
- IMPROVED: Fraud checks

### v1.0.19 - High-Cancelation-Rate Check
- IMPROVED: High-Cancelation-Rate Check

### v1.0.18 - Installation Instructions
- IMPROVED: Installation instructions and API key clarification

### v1.0.17 - Fraud Detection
- IMPROVED: Fraud detection accuracy and performance

### v1.0.16 - Email Blacklist Management
- NEW: Email blacklist feature with wildcard support

### v1.0.15 - Setup Wizard
- NEW: Setup Wizard created

### v1.0.14 - Dashboard Features
- IMPROVED: Fraud detection and dashboard features

### v1.0.12 - Security & Architecture Overhaul
- MAJOR SECURITY: Fixed all SQL injection vulnerabilities
- ARCHITECTURE: Complete code refactoring into specialized classes
- ENTERPRISE FEATURES: Review Queue System and Webhook System
- TESTING SUITE: Complete PHPUnit test coverage
- PERFORMANCE: Optimized pagination and database queries

## Requirements

- **WordPress**: 5.8 or higher
- **WooCommerce**: 6.0 or higher
- **PHP**: 7.4 or higher
- **Database**: MySQL 5.6 or higher

## Support

For support and documentation, visit [aegilock.de](https://aegilock.de)

## License

This plugin is licensed under GPL v2 or later.

---

**Aegilock Transaction Guardian** - Protecting your WooCommerce store from fraud since 2025.