Răsfoiți Sursa

Update documentation for v1.5.1

- Version bumped to 1.5.1 in CLAUDE.md, readme.md, and .po files
- Added v1.5.1 changelog entry with all bugfixes
- Updated manipulator class docs: auto-detect taxonomy, always-on logging
- Updated admin.js docs: safeInit wrapper, media AJAX handlers
- Updated v1.5.0 changelog to reflect final taxonomy detection approach

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dalibor Votruba 3 luni în urmă
părinte
comite
86e64d733a

+ 6 - 3
studiou-wc-product-cat-manage/CLAUDE.md

@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
 
 **QDR - Studiou WC Export/Import Product Categories** is a WordPress plugin that extends WooCommerce to provide batch export/import functionality for both product categories and products, along with category manipulation tools.
 
-**Current Version:** 1.5.0
+**Current Version:** 1.5.1
 
 ## Requirements
 
@@ -54,7 +54,8 @@ The plugin follows a modular class-based architecture:
   - Clear Media Categories (permanently deletes media files from media categories) (NEW in v1.5)
   - Uses direct database queries for reliable product detection
   - Batch processing for delete operations (10 products per batch)
-  - Auto-detects media category taxonomy (media_category, attachment_category, media-category)
+  - Auto-detects media category taxonomy (any custom taxonomy registered for attachments)
+  - Always-on error logging for media operations (prefix: "STUDIOU WC MEDIA:")
 
 - **class-studiou-wc-product-manage-product-db.php** - Product database operations (NEW in v1.4)
   - Retrieves product categories with hierarchy
@@ -113,9 +114,11 @@ The plugin follows a modular class-based architecture:
   - Warning message styling (yellow background for destructive operations)
   - Danger button styling (red for delete operations)
 - **assets/js/admin.js** - Admin JavaScript including:
+  - `safeInit()` wrapper - each form init is isolated in try-catch so one error cannot block others
   - AJAX handlers for all category operations
   - AJAX handlers for product import/export operations (NEW in v1.4)
-  - Batch processing logic for delete operations
+  - AJAX handlers for clear media categories operations (NEW in v1.5)
+  - Batch processing logic for delete and media deletion operations
   - Real-time progress bar updates
   - Confirmation dialogs for destructive operations
   - Failed products CSV download handler

+ 1 - 1
studiou-wc-product-cat-manage/languages/studiou-wc-product-cat-manage-cs_CZ.po

@@ -3,7 +3,7 @@
 # This file is distributed under the same license as the QDR - Studiou WC Export/Import Product Categories package.
 msgid ""
 msgstr ""
-"Project-Id-Version: QDR - Studiou WC Export/Import Product Categories 1.5.0\n"
+"Project-Id-Version: QDR - Studiou WC Export/Import Product Categories 1.5.1\n"
 "Report-Msgid-Bugs-To: https://www.quadarax.com/plugins/studiou-wc-product-"
 "cat-manage\n"
 "POT-Creation-Date: 2026-04-01 12:00+0000\n"

+ 1 - 1
studiou-wc-product-cat-manage/languages/studiou-wc-product-cat-manage.po

@@ -2,7 +2,7 @@
 # This file is distributed under the same license as the QDR - Studiou WC Export/Import Product Categories package.
 msgid ""
 msgstr ""
-"Project-Id-Version: QDR - Studiou WC Export/Import Product Categories 1.5.0\n"
+"Project-Id-Version: QDR - Studiou WC Export/Import Product Categories 1.5.1\n"
 "Report-Msgid-Bugs-To: https://www.quadarax.com/plugins/studiou-wc-product-cat-manage\n"
 "POT-Creation-Date: 2026-04-01 12:00+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

+ 12 - 3
studiou-wc-product-cat-manage/readme.md

@@ -1,6 +1,6 @@
 # QDR - Studiou WC Export/Import Product Categories
 
-**Version: 1.5**
+**Version: 1.5.1**
 
 A WordPress plugin that extends WooCommerce to provide batch export and import functionality for both product categories and products, along with category manipulation tools.
 
@@ -300,6 +300,16 @@ For support, please visit [https://www.quadarax.com/plugins/studiou-wc-product-c
 
 ## Changelog
 
+### Version 1.5.1
+- Fix: Clear Media Categories JS event handler not binding due to browser-cached old JS
+- Fix: Auto-detect any custom taxonomy registered for attachments (no longer limited to 3 hardcoded names)
+- Fix: Use spread operator for `$wpdb->prepare()` args for WP 6.8+ compatibility
+- Fix: Add `return` after `wp_send_json_error()` calls to prevent execution leak
+- Fix: Force `wp_update_term_count_now()` after batch deletion to refresh category counts
+- Improved JS initialization: each form init wrapped in try-catch (`safeInit`) so one error cannot block others
+- Always-on error logging for media operations (prefix: `STUDIOU WC MEDIA:`)
+- Added `onsubmit="return false;"` fallback on clear media form
+
 ### Version 1.5.0
 - **NEW: Clear Media Categories** - permanently delete all media files from selected media categories
   - Checkbox list of media categories with file count per category
@@ -309,12 +319,11 @@ For support, please visit [https://www.quadarax.com/plugins/studiou-wc-product-c
   - Batch processing for large-scale deletions (processes 10 media files at a time)
   - Comprehensive deletion statistics and error reporting
   - Enhanced warning messages for destructive operations
-  - Auto-detection of media category taxonomy (supports media_category, attachment_category, media-category)
+  - Auto-detection of media category taxonomy for attachments
   - Graceful fallback message when no media category plugin is installed
 - 2 new AJAX handlers: `studiou_wcpcm_clear_media`, `studiou_wcpcm_clear_media_batch`
 - Updated Category Manipulations page with new Clear Media Categories section
 - Added Important Notes entry for the new feature
-- Version bumped to 1.5.0
 
 ### Version 1.4.0
 - **NEW: Product Import** - Batch import variable products and variations from CSV