|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
## Project Overview
|
|
## Project Overview
|
|
|
|
|
|
|
|
-WordPress/WooCommerce plugin called **studiou-wc-free-photo-product** (QDR - Studiou WC Free Photo Product) v1.5.10.
|
|
|
|
|
|
|
+WordPress/WooCommerce plugin called **studiou-wc-free-photo-product** (QDR - Studiou WC Free Photo Product) v1.5.11.
|
|
|
Allows publishing special variable products where customers upload custom raw images to be printed for a price.
|
|
Allows publishing special variable products where customers upload custom raw images to be printed for a price.
|
|
|
|
|
|
|
|
## Initial Requirements
|
|
## Initial Requirements
|
|
@@ -52,7 +52,7 @@ Allows publishing special variable products where customers upload custom raw im
|
|
|
1. `maybe_suppress_pvtfw()` detaches pvtfw's `print_table` and `available_options_btn` hooks on `wp` priority 5.
|
|
1. `maybe_suppress_pvtfw()` detaches pvtfw's `print_table` and `available_options_btn` hooks on `wp` priority 5.
|
|
|
2. `render_upload_area()` on `woocommerce_single_product_summary` priority 35 passes variants + max uploads + existing batch files + hero preview URL to JS via `wp_localize_script('studiou-wcfpp-frontend', 'studiouFppCardData', ...)`.
|
|
2. `render_upload_area()` on `woocommerce_single_product_summary` priority 35 passes variants + max uploads + existing batch files + hero preview URL to JS via `wp_localize_script('studiou-wcfpp-frontend', 'studiouFppCardData', ...)`.
|
|
|
3. Browser renders:
|
|
3. Browser renders:
|
|
|
- - **Dropzone** (multi-file `<input type="file" multiple>`) — accepts drag-drop + click-to-browse.
|
|
|
|
|
|
|
+ - **Dropzone** (multi-file `<input type="file" multiple>`) — accepts drag-drop + click-to-browse. Click-to-browse opens the native file picker via `$fileInput[0].click()` (NOT `$fileInput.trigger('click')`), because the `<input>` lives inside the dropzone element and a bubbling jQuery trigger re-entered the dropzone's own click handler, causing `Maximum call stack size exceeded` on mobile where the browser synthesizes an extra click when the picker closes (fixed in 1.5.11).
|
|
|
- **Cards stack** — one card per upload, all built client-side by `buildCard()` from `studiouFppCardData`.
|
|
- **Cards stack** — one card per upload, all built client-side by `buildCard()` from `studiouFppCardData`.
|
|
|
- **Order overview panel** — rendered server-side initially from `WC()->cart` filtered to the current product; re-rendered in-place after each cart change.
|
|
- **Order overview panel** — rendered server-side initially from `WC()->cart` filtered to the current product; re-rendered in-place after each cart change.
|
|
|
4. Customer drops photos → `enqueueFiles()` creates a "uploading" card per file, queue processes sequentially via chunked AJAX.
|
|
4. Customer drops photos → `enqueueFiles()` creates a "uploading" card per file, queue processes sequentially via chunked AJAX.
|