=== PrimeLink - WooCommerce Import Export ===
Contributors: malotop
Tags: woocommerce, import, export, csv, xlsx, xml, products, orders, customers, coupons, categories, tags, attributes, variations, reviews, ftp, sftp, scheduling, templates, anomaly detection
Requires at least: 5.8
Tested up to: 6.4
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Advanced import-export plugin for WooCommerce with visual mapping, cron scheduling, background processing, and intelligent anomaly detection.

== Description ==

PrimeLink is a comprehensive import/export solution built specifically for WooCommerce. It provides powerful tools for managing your store data with ease, whether you're importing products from external sources or exporting orders for analysis.

= Key Features =

* **Visual Field Mapping**: Drag-and-drop interface for mapping source columns to WooCommerce fields
* **Multiple Data Sources**: Upload files, use existing server files, URLs, FTP/SFTP, or connect to external platforms
* **Smart Anomaly Detection**: Automatically detects price changes, content modifications, and data quality issues during import
* **Export Capabilities**: Export to CSV, XML, XLSX, or PDF formats
* **Template Management**: Save and reuse import/export mappings for faster workflows
* **Scheduling**: Automatic imports and exports via WordPress cron
* **Background Processing**: Long-running jobs processed in the background without blocking your admin
* **Test Mode**: Run imports in dry-run mode to validate data before committing changes
* **Rollback Support**: Track and rollback imports when needed

= Supported Entity Types =

* Products (Simple, Variable, Grouped, External)
* Orders
* Customers
* Coupons
* Product Categories
* Product Tags
* Product Attributes
* Product Variations
* Product Reviews
* Product Downloads

= Anomaly Detection =

PrimeLink includes intelligent anomaly detection that monitors your import data for potential issues:

* **Price Anomalies**: Detects sudden price drops or increases (configurable thresholds)
* **Content Changes**: Monitors description and title modifications
* **Stock Issues**: Identifies stock level problems
* **Data Quality**: Checks for missing SKUs, invalid URLs, and other quality issues

When anomalies are detected, you can review them in a dedicated modal, navigate directly to affected items, and export anomaly reports for analysis.

= Platform Connectors =

Connect to external platforms for real-time data import:

* Shopify
* BigCommerce
* Magento

Connection credentials are securely stored and automatically pre-filled in import wizards.

== Installation ==

1. Upload the plugin folder `primelink` to `wp-content/plugins/` **or** upload the ZIP file via **Plugins → Add New → Upload Plugin**.
2. Activate **PrimeLink – WooCommerce Import Export** from the **Plugins** page.
3. After activation, open **WooCommerce → PrimeLink** (or the PrimeLink menu entry) and follow the **Setup Wizard**:
   * Enter your license/purchase code (if applicable).
   * Review basic environment checks.
   * Configure email notifications and basic defaults.

== Frequently Asked Questions ==

= Does this work with WooCommerce? =

Yes, WooCommerce 5.0 or higher is required. PrimeLink is built specifically for WooCommerce and integrates seamlessly with all WooCommerce features.

= What file formats are supported? =

For import: CSV, XML, XLSX
For export: CSV, XML, XLSX, PDF

= Can I schedule automatic imports/exports? =

Yes, PrimeLink uses WordPress cron to schedule automatic imports and exports. You can set schedules for hourly, daily, weekly, or monthly intervals.

= What happens if anomalies are detected during import? =

When anomalies are detected, PrimeLink will:
* Log all anomalies with their severity level (Critical, Warning, Info)
* Automatically pause the import if critical anomalies are found
* Send email alerts for critical issues
* Display a "Review Anomalies" button in the Manage Imports screen
* Allow you to review, export, and navigate to affected items

= Can I rollback an import? =

Yes, PrimeLink tracks all imports and allows you to rollback changes. This feature requires the import to have been completed with tracking enabled.

= Is my data safe? =

Yes. PrimeLink includes comprehensive security measures:
* All REST API endpoints are protected with capability checks and nonce verification
* AJAX endpoints are admin-only and protected
* Input data is sanitized using WordPress standards
* Optional rate limiting to prevent abuse

= Can I use templates for repeated imports/exports? =

Yes, PrimeLink includes a Template Manager where you can save and reuse field mappings for any entity type. Templates can be loaded directly in import and export wizards.

== Screenshots ==

1. Import wizard with visual field mapping
2. Export configuration and field selection
3. Manage Imports screen with progress tracking
4. Anomaly Review modal with detailed information
5. Template Manager for saved mappings
6. Statistics dashboard with charts

== Changelog ==

= 1.0.0 =
* Initial release
* Visual import/export wizards for all WooCommerce entity types
* Multiple data sources (Upload, URL, FTP/SFTP, Platform Connectors)
* Template management system
* Scheduling via WordPress cron
* Background processing for long-running jobs
* Intelligent anomaly detection with three severity levels
* Anomaly review modal with export capabilities
* Test mode / dry-run functionality
* Rollback support for imports
* Statistics and analytics dashboard
* System status checker
* Activation wizard for first-time setup

== Upgrade Notice ==

= 1.0.0 =
Initial release of PrimeLink. This is the first stable version with full feature set.

== Support ==

For support, documentation, and updates, please visit the plugin page or contact the author.

