=== Drag & Drop File Upload for WooCommerce ===
Contributors: therssoftware
Tags: woocommerce, file upload, drag and drop, product attachments, uploader
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Allow customers to upload artwork, photos, documents, and specifications directly on WooCommerce product pages with an intuitive drag-and-drop zone.

== Description ==

Selling custom t-shirts, personalized gifts, 3D printing services, engraved jewelry, or printed documents? **Drag & Drop File Upload for WooCommerce** provides an effortless, high-performance file dropzone directly above or below the "Add to Cart" button.

Customers simply drag and drop their files or browse from their device. Files upload instantly via AJAX with live progress bars, client-side validation, and thumbnail previews before checkout.

[Live Demo](https://wpdemo.test/plugins/drag-drop-file-upload/) | [Documentation](https://wpdemo.test/plugins/drag-drop-file-upload/) | [Upgrade to Pro](https://wpdemo.test/plugins/drag-drop-file-upload/)

### 📂 Free Core Features:

* 📥 **Intuitive Drag & Drop Dropzone:** Sleek dropzone embedded right on the single product page with smooth hover animations.
* ⚡ **Instant AJAX File Uploads:** Asynchronous uploads with real-time percentage progress bar without freezing the page.
* ✂️ **In-Browser Image Cropper & Rotator:** Allow customers to crop their photos to aspect ratios (1:1 square, 4:3, 16:9, or free) and rotate images before uploading.
* 💵 **Upload Surcharge Fee Engine:** Automatically add a flat fee or percentage charge per uploaded file to monetize file preparation and artwork setup.
* 📁 **Multi-File Uploads:** Allow customers to upload multiple files per product with configurable limits.
* 📦 **1-Click Admin Bulk ZIP Download:** Download all customer files for an entire order as a single organized ZIP archive from the order details screen.
* 🛡️ **Comprehensive Extension Security:** Restrict uploads by allowed MIME types and extensions (JPG, PNG, PDF, ZIP, DOCX, etc.) to prevent malicious files.
* 📏 **File Size Limits & Chunking:** Set maximum file size thresholds with friendly customer error messaging and large file chunking support.
* 🖼️ **Client-Side Image Previews:** Uploaded images immediately display thumbnail previews with file size badges and remove buttons.
* 🛒 **Seamless Cart & Checkout Integration:** Attached files are preserved in the WooCommerce cart session and visible on the checkout review table.
* 📋 **Admin Order Management:** Store managers can view, preview, approve, and download uploaded customer files directly inside the WooCommerce Order Edit screen.
* 🔒 **Security Sanitization:** Uploaded files are quarantined outside public directories with execution prevention and EXIF metadata stripping.
* 🚀 **HPOS Compatible:** Fully compliant with WooCommerce High-Performance Order Storage (custom order tables).

---

### 👑 Premium Features (Drag & Drop File Upload Pro):

For print shops, commercial manufacturing, and advanced personalization businesses requiring cloud infrastructure:

* ☁️ **Cloud Storage Offloading (Cloudflare R2 & AWS S3):** Stream large multi-gigabyte client files directly to cloud object storage to save server disk space.
* 🎨 **Prepress CMYK Color Verification:** Automated validation for vector art and print-ready color profiles.
* 📊 **Bulk CSV & Excel Export:** Export all upload file paths, customer notes, and production statuses in one click.
* 🔄 **Automated Proofing & Approval Portal:** Client-facing revision approvals with automated email notifications.

[Learn more about Pro & Pricing](https://wpdemo.test/plugins/drag-drop-file-upload/)

---

== External Services ==

This plugin does not connect to any third-party services, external servers, or remote APIs. All file uploads, image cropping, and archive creation take place entirely on your local WordPress installation.

== Installation ==

1. In your WordPress Admin, go to **Plugins > Add New**.
2. Search for `Drag & Drop File Upload for WooCommerce`.
3. Click **Install Now**, then click **Activate**.
4. Go to **WooCommerce > File Uploads** in your admin menu.
5. Set your allowed file types, max file size, and dropzone text.
6. Enable file uploads globally or customize per-product in **Product Data > File Uploads**!

== Frequently Asked Questions ==

= Where are customer uploaded files stored? =
Files are securely stored in a protected upload subdirectory (`wp-content/uploads/dduw-files/`) with `.htaccess` and `index.php` execution protection to prevent direct execution of PHP or malicious scripts.

= Can I enable uploads for specific products only? =
Yes! You can choose to enable the dropzone globally for all products, or restrict it to specific categories or individual products in the product edit screen.

= Can customers upload files from their smartphones? =
Yes, the dropzone is fully touch-optimized. On mobile devices, clicking the dropzone lets users select photos directly from their camera roll or take a new photo instantly.

= What happens if the customer cancels their cart? =
Temporary abandoned files are automatically cleaned up on a scheduled daily WP-Cron cycle to save disk space.

= Is WooCommerce HPOS supported? =
Yes, Drag & Drop File Upload is 100% compatible with WooCommerce High-Performance Order Storage.

== Screenshots ==

1. **Product Page Dropzone:** Clean drag and drop area with instant image preview.
2. **Admin Settings Panel:** Easy configuration of allowed file extensions and size limits.
3. **Admin Order Screen:** File view and download links on the WooCommerce order details page.
4. **Mobile Responsive Dropzone:** Seamless upload experience on touch devices.

== Changelog ==

= 1.1.0 =
* Initial official release on WordPress.org.
* Drag-and-drop AJAX file uploader on WooCommerce single product pages.
* Client-side image cropping and rotation before upload.
* Surcharge fee calculations for uploaded files.
* Admin bulk ZIP archive download for order attachments.
* Allowed file types and max size validation.
* Image thumbnail previews with remove button.
* Admin order view and download links.
* Full WooCommerce HPOS compatibility.
