=== 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.9
Stable tag: 1.0.0
Requires PHP: 8.0
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, Dropbox, Google Drive, OneDrive, 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. Upload exports to FTP/SFTP, Dropbox, Google Drive, or OneDrive
* **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.

= Cloud Storage Integration =

PrimeLink supports importing from and exporting to popular cloud storage services:

* **OneDrive**: OAuth 2.0 authentication with Azure AD, support for personal and business accounts, file browsing with folder navigation, large file upload support
* **Google Drive**: OAuth 2.0 authentication with Google Cloud Console, file browsing and selection, large file upload support
* **Dropbox**: OAuth 2.0 access token authentication, file path or share link support, large file upload support with chunked uploads

All cloud storage credentials are securely stored in plugin settings and can be configured in Settings → Integrations.

= 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, Dropbox, Google Drive, OneDrive
* Template Management system
* Scheduling with WordPress cron
* Background Processing for long-running jobs
* Test Mode / Dry-run functionality
* Rollback Support for imports
* Intelligent Anomaly Detection with three severity levels
* Cloud Storage Integration (OneDrive, Google Drive, Dropbox)
* Platform Connectors (Shopify, BigCommerce, Magento)
* Statistics Dashboard and System Status
* Activation Wizard for first-time setup
* Improved Google Drive integration with OAuth 2.0
* Enhanced file browsing for OneDrive with folder navigation
* Support for large file uploads to Dropbox (upload session for files >150MB)
* Support for large file uploads to OneDrive (upload session for files >4MB)
* Fixed "call to private method" error in AdvancedDuplicateDetectionService
* Improved error handling and user feedback for cloud storage integrations
* Removed development logging for production readiness
* Enhanced security and compliance with Envato standards

== Upgrade Notice ==

= 1.0.0 =
Initial release of PrimeLink - WooCommerce Import Export. This plugin provides comprehensive import/export functionality for WooCommerce with visual mapping, scheduling, and background processing.

== Support ==

For support, documentation, and updates, please visit:
* Documentation: https://docs.malotop.ro/primelink/
* Plugin Page: https://primelink.malotop.ro/

