Dalibor Votruba dvotruba

dvotruba запушил(а) master в dvotruba/qdr.app.woo.plugins

  • 20df564480 Merge branch 'refs/heads/1.5.0.studiou-wc-ord-print-statuses' sync from v1.5.1
  • 29d11884f7 Release v1.5.1 — auto "Done Print" on bulk "Change status to Completed" Implements docs/order-done-plan-01.md: scoped to WooCommerce's own "Change status to Completed" bulk action on the HPOS Orders list only. - Order_Item_Status_Manager::bulk_complete_advance_items() — hooked to handle_bulk_actions-woocommerce_page_wc-orders at priority 9 (before WC's own priority-10 mark_completed handler). For each selected non-terminal order it advances pending/in-print items to done-print before the status flip, so the completion guard passes instead of reverting. Terminal/ already-completed orders are skipped; each order runs in try/catch so one failure cannot abort the batch. - Guard fallback (belt-and-suspenders) in on_order_status_changed(): if the priority-9 pre-advance ever loses the ordering race, the completion guard detects the same bulk-complete context (is_bulk_complete_request()) and advances remaining items on the same order instance instead of reverting. Priority-independent; closes the two-instance object-cache concern. Orders whose previous status was terminal are still reverted, preserving the skip. - Scope: single-order, programmatic/REST/cron, protocol-import, and all other bulk completions keep the standard completion-guard behaviour. Version bumped to 1.5.1 (plugin header + STUDIOU_WC_OPS_VERSION). README, CLAUDE.md, docs/translations.txt, and cs_CZ .po/.mo updated; three new translatable strings added and the .mo recompiled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
  • 9a945f2738 add implementation plans
  • Просмотр сравнение для этих 3 коммитов »

3 недель назад

dvotruba запушил(а) метку 1.5.1.studiou-wc-ord-print-statuses в dvotruba/qdr.app.woo.plugins

3 недель назад

dvotruba запушил(а) 1.5.0.studiou-wc-ord-print-statuses в dvotruba/qdr.app.woo.plugins

  • 29d11884f7 Release v1.5.1 — auto "Done Print" on bulk "Change status to Completed" Implements docs/order-done-plan-01.md: scoped to WooCommerce's own "Change status to Completed" bulk action on the HPOS Orders list only. - Order_Item_Status_Manager::bulk_complete_advance_items() — hooked to handle_bulk_actions-woocommerce_page_wc-orders at priority 9 (before WC's own priority-10 mark_completed handler). For each selected non-terminal order it advances pending/in-print items to done-print before the status flip, so the completion guard passes instead of reverting. Terminal/ already-completed orders are skipped; each order runs in try/catch so one failure cannot abort the batch. - Guard fallback (belt-and-suspenders) in on_order_status_changed(): if the priority-9 pre-advance ever loses the ordering race, the completion guard detects the same bulk-complete context (is_bulk_complete_request()) and advances remaining items on the same order instance instead of reverting. Priority-independent; closes the two-instance object-cache concern. Orders whose previous status was terminal are still reverted, preserving the skip. - Scope: single-order, programmatic/REST/cron, protocol-import, and all other bulk completions keep the standard completion-guard behaviour. Version bumped to 1.5.1 (plugin header + STUDIOU_WC_OPS_VERSION). README, CLAUDE.md, docs/translations.txt, and cs_CZ .po/.mo updated; three new translatable strings added and the .mo recompiled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
  • 9a945f2738 add implementation plans
  • d6f2d7ccbf Release v1.5.0 — per-order-item print status feature Implements the feature described in docs/feature-order-item-status-analysis.md. Minor version bump because this is a new feature, not a bug-fix. What's new: - Four item-level statuses: pending-print (initial), in-print, done-print, skip-print. Stored as _print_status meta on each WC_Order_Item_Product in {$wpdb->prefix}woocommerce_order_itemmeta. Missing meta defaults to pending-print (lazy — no migration needed for existing orders). - "Print Status" column added to the order edit screen's Items table. Per-row <select> lets the operator change each product item's status manually. Non-product items show — and aren't editable. - Order → wc-in-print transitions automatically advance every pending-print item to in-print. Other item statuses are untouched. - Order → wc-completed transitions are gated: blocked when any product item is still pending-print or in-print. Blocked transitions revert to the previous status with an admin notice listing the unready count. Existing already-completed orders are unaffected. - Order activity feed records every item-status change ("Item #5 (Product A): Pending Print → Done Print.") and batch propagations ("3 line items advanced to In Print by order-status change."). - Delivered Protocol import calls advance_remaining_to_done() before each order's status flip so the completion guard is satisfied automatically. Per-order and cross-import notices report the count. - InPrint Protocol import benefits from the propagation listener without needing explicit per-item code. - Bulk action "Set Status to In Printing" now also propagates items via the listener (no Bulk_Actions_Manager change). "Set Status to Prepare to Printing" stays order-only. - CSV export adds prod_print_status column. The SQL LEFT JOINs woocommerce_order_itemmeta on order_item_id filtered to _print_status, with COALESCE(..., 'pending-print') for the lazy default. New class: - includes/class-order-item-status-manager.php — owns UI rendering, POST save, propagation/guard listener (priority 5 on woocommerce_order_status_changed, with $inside_self_revert flag for recursion safety), and the advance_pending_to_in / advance_remaining_to_done helpers consumed by import_delivered_protocol. Coupling rules summary (see README §"Per-order-item print status"): Order → wc-in-print → pending items advance to in-print Order → wc-completed → gated (no propagation, just blocks) All other transitions → no item change Item status changes → never propagate to the order Docs: - README "Changelog" extends with the 1.5.0 entry; new feature section with the coupling-rules table; CSV column list updated. - CLAUDE.md gets a new manager entry (#8) and a 1.5.0 Recent Changes block. - docs/translations.txt: 12 new EN→CS entries (status labels, column header, audit-note format, propagation/guard notices, Delivered Protocol advance summary). - languages/studiou-wc-ord-print-statuses-cs_CZ.po: Project-Id-Version bumped to 1.5.0; same new strings with Czech 3-form plurals. Known limitations carried into 1.5.0: classic order edit screen only — WC 10.x block-based order edit screen unsupported (tracked as phase 2). NOTE: .mo not rebuilt — run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 746676ccb0 Add implementation analysis for per-order-item print status (v1.5.0) Planning document for the proposed v1.5.0 feature — adding a per-line-item print status (pending-print / in-print / done-print / skip-print) with a combo box in the order edit screen and a completion guard. Key decisions captured in the doc: - The stakeholder dropped the original "order and item statuses are independent" requirement, so the analysis is structured around an explicit coupling-rules table (§3) rather than trying to reconcile a contradiction: - Order → wc-in-print: pending-print items advance to in-print (propagation, via the same listener used for the guard). - Order → wc-completed: gated — blocked if any product item is still pending-print or in-print. - All other order transitions, and any manual item-status change: no propagation. - Item statuses live in WC_Order_Item meta key `_print_status` (lazy default = pending-print, no migration needed). - A single new Order_Item_Status_Manager class handles UI rendering, POST save, propagation, and the guard via a combined listener on woocommerce_order_status_changed. - Protocol imports become natural consumers: InPrint Protocol gets propagation for free (no code change); Delivered Protocol must call advance_remaining_to_done() before the order completes so the guard is satisfied. - CSV export gains a prod_print_status column. - Estimated effort: 14–20 hours for Phase 1 (classic order edit screen only; block-based screen tracked as Phase 2). Open questions (§4) for stakeholder before implementation begins. No code changed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 54a62e7c7d Release v1.4.5 — resolve in-scope findings from revise-1.4.4 Adds docs/revise-1.4.4.md (fresh-eye review of 1.4.4) alongside the defensive fixes for the mediums and lows it raised. No critical/high findings in this round — the plugin is in a steady state. Medium: - normalise_csv_date fast path now validates ranges via checkdate() + hour/minute/second bounds. "2026-13-45T25:99" no longer matches and falls through to the DateTimeImmutable fallback, which throws. - emit_import_summary surfaces an info notice ("The CSV file contained no actionable rows (empty order_no column).") when both $updated and $errors are zero. Closes the silent-import path where dedup-by- order_no filters out every row. - csv_escape calls ltrim before the first-char check. Cells like " =CMD" with leading whitespace are no longer slipping past the formula-injection defence. Low: - parse_csv rejects CSVs whose normalised headers collide (e.g., "Order No" and "order_no" both → "order_no"). Logs the headers and returns empty; the downstream import then emits the existing "could not be parsed" notice. - bulk_set_print_status note dispatch lifted from binary ternary to an explicit array(slug => note) map with isset fallback. Future contributors adding a third status no longer risk inheriting the wrong note via an else-implicit branch. Deferred (documented, no code change): - §3.4 collation mismatch on terms.slug = postmeta.meta_value — added to README "Known limitations". Adding an explicit COLLATE clause risks breaking installs whose actual collation differs from any hardcoded value. - §4.3 main plugin instance lifecycle — architectural curiosity, no functional impact. - §4.4 woocommerce_missing_notice mid-request re-fire — edge case. Docs: - README "Changelog" extends with the 1.4.5 entry; "Known limitations" gains the collation note; pointer to docs/revise-1.4.4.md added. - CLAUDE.md picks up the 1.4.5 changes. - docs/revise-1.4.4.md is the fresh-eye review of 1.4.4; every finding carries an inline ✅ resolved / ⏸ deferred status marker. - docs/translations.txt: header bumped to 1.4.5; one new EN→CS entry for the "no actionable rows" notice. - languages/studiou-wc-ord-print-statuses-cs_CZ.po: Project-Id-Version bumped to 1.4.5; same new string added with Czech translation. NOTE: .mo not rebuilt — run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • Просмотр сравнение для этих 6 коммитов »

3 недель назад

dvotruba запушил(а) master в dvotruba/qdr.app.woo.plugins

  • 03ded37711 Merge branch '1.5.0.studiou-wc-product-cat-manage' sync from v.1.7.1
  • e3464525a8 Catch pre-v1.6.1 attachments in image dedup — v1.7.2 Reported: re-importing a product whose image was already in the Media Library (uploaded manually, or via a pre-v1.6.1 import) still sideloaded a "18-IMG_3319-1.jpg" duplicate, because the existing attachment lacked the _studiou_wcpcm_source_url postmeta the v1.6.1 matcher relied on. This was a known limitation (fix-multi-image-plan-01.md §11) — closing it now that real imports are hitting it. Fix: extend find_attachment_by_source_url() with a fallback match by _wp_attached_file against the uploads-relative path derived from the URL. Steps: 1. Parse the URL's path (parse_url(..., PHP_URL_PATH)). 2. Parse the configured uploads baseurl's path (wp_upload_dir()). 3. Strip the baseurl path prefix from the URL path; urldecode the rest. 4. Query attachments where _wp_attached_file == that relative path. 5. On hit, write _studiou_wcpcm_source_url on the matched attachment so the next import of the same URL takes the precise O(1) path instead of the fallback. The cache is self-healing. Order of precedence is unchanged: in-request static cache -> _studiou_wcpcm_source_url exact match -> fallback by uploads-relative path -> fresh sideload. Trade-off note: two distinct URLs that resolve to the same uploads- relative path collapse to the same attachment. That requires both URLs to point at this WordPress install's own uploads tree — i.e. they genuinely ARE the same file — so the fallback stays accurate in practice. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • Просмотр сравнение для этих 2 коммитов »

1 месяц назад

dvotruba запушил(а) метку 1.7.2.studiou-wc-product-cat-manage в dvotruba/qdr.app.woo.plugins

1 месяц назад

dvotruba запушил(а) 1.5.0.studiou-wc-product-cat-manage в dvotruba/qdr.app.woo.plugins

  • e3464525a8 Catch pre-v1.6.1 attachments in image dedup — v1.7.2 Reported: re-importing a product whose image was already in the Media Library (uploaded manually, or via a pre-v1.6.1 import) still sideloaded a "18-IMG_3319-1.jpg" duplicate, because the existing attachment lacked the _studiou_wcpcm_source_url postmeta the v1.6.1 matcher relied on. This was a known limitation (fix-multi-image-plan-01.md §11) — closing it now that real imports are hitting it. Fix: extend find_attachment_by_source_url() with a fallback match by _wp_attached_file against the uploads-relative path derived from the URL. Steps: 1. Parse the URL's path (parse_url(..., PHP_URL_PATH)). 2. Parse the configured uploads baseurl's path (wp_upload_dir()). 3. Strip the baseurl path prefix from the URL path; urldecode the rest. 4. Query attachments where _wp_attached_file == that relative path. 5. On hit, write _studiou_wcpcm_source_url on the matched attachment so the next import of the same URL takes the precise O(1) path instead of the fallback. The cache is self-healing. Order of precedence is unchanged: in-request static cache -> _studiou_wcpcm_source_url exact match -> fallback by uploads-relative path -> fresh sideload. Trade-off note: two distinct URLs that resolve to the same uploads- relative path collapse to the same attachment. That requires both URLs to point at this WordPress install's own uploads tree — i.e. they genuinely ARE the same file — so the fallback stays accurate in practice. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

1 месяц назад

dvotruba запушил(а) master в dvotruba/qdr.app.woo.plugins

  • 6255f26a15 Merge branch '1.5.0.studiou-wc-product-cat-manage' sync from v.1.7.1
  • 4b7132cf5f regenerate .mo file
  • c2795aed19 Update .po files for v1.6.2 -> v1.7.1 strings Sweeps every translatable string introduced or rewritten across the review-00-plan Phase A-E commits and adds them to both .po files. Replaced (Phase A — M6 warning rewrite): * "This operation permanently deletes all media files that are not assigned to any media category and are not used as featured image, product gallery image, or attached to any post." -> the new long enumeration that lists what IS detected, including the v1.6.2 termmeta + customizer exclusions. * "WARNING: This operation will permanently delete all unused uncategorized media files from the server. This action cannot be undone!" -> the new short "WARNING: This action cannot be undone." Added — Phase A (M6 warning bullets, H4 ragged-row, M4 guard): * Detection-is-heuristic intro + 4 bullets (content HTML, ACF/meta, downloadable files, "delete media that nothing I can detect is using"). * "Row %1$d: column count mismatch ... Row skipped." * "Import too large to stage (%d rows) ..." Added — Phase C (H5): * "Invalid file" Added — Phase D (M1 + M4 rework): * "Failed to stage import data on disk (write error)." * "CSV contains no data rows." * "OK" * "Row %d: %s" Added — Phase E (L7, L1): * "Warning: %d variations have a sale price greater than the new regular price (sale > regular). Review the variations and adjust the sale price." * 6 JS-side i18n keys: selectBothCategories, moveNoProducts, importInitializing, importComplete, deletionSummary, importSummary. Project-Id-Version header bumped to 1.7.1 in both files. References updated to point at views/manipulations/tab-remove-unassigned.php (the v1.6.0 partial) for the M6 strings instead of the old aggregated views/manipulations.php. The .mo file regeneration is handled separately by the maintainer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • e9f250c14d Phase E — cleanup pass — v1.7.1 Implements review-00-plan-00.md Phase E. Items addressed: * M7 — Product importer success-path logs are now gated behind WP_DEBUG (Processing categories for X, Categories assigned, etc.). Failure-path logs (zero categories matched, term insert failed, category creation failed) stay always-on. Matches CLAUDE.md's "Only logs failures" policy. * M8 — find_or_create_category_by_name (the new name; old find_category_by_name is now a thin alias) caches the full product_cat term list in a private static after the first miss-path call, so subsequent rows reuse it instead of re-running get_terms. Newly created terms append into the cache so they're visible to later rows in the same request. * M9 — get_categories_with_counts_uncached() replaces the per-category count loop with a single GROUP BY query. The query joins wp_posts with the SAME filters get_category_product_count applies (post_type='product', post_status IN publish/private/draft), so trashed and draft products no longer inflate displayed counts. Zero- count categories survive the LEFT JOIN. * L2 — Product export row count now accumulates during generation (export_products gains a by-ref &$row_count out param), so multi-line description fields no longer inflate the displayed count via substr_count("\n"). * L4 — Runtime-generated versioned asset copies (admin-X.Y.Z.js etc.) moved from the plugin directory into uploads/studiou-wcpcm-cache/<rel>/. The plugin dir stays untouched; security scanners stop tripping; managed hosts with read-only plugin dirs work. index.php silence files written into the cache subdirs. * L7 — UPVP apply_variant_price now detects variations whose sale_price would be greater than the new regular_price after the update, logs a "STUDIOU WC UPVP:" warning per affected variation, and returns them in a sale_warnings response field for the dry-run / results UI to show. Does NOT auto-clamp the sale_price (operator- owned). * L1 — Five new i18n keys added (selectBothCategories, moveNoProducts, importInitializing, importComplete, deletionSummary, importSummary). The Phase-D batched flows already use studiouWcpcm.i18n.* with English fallbacks, so they pick up these keys automatically once the .po files are updated. * L6, L8 — doc-only notes added under a new "Security notes" section in CLAUDE.md: server-side image fetching is SSRF surface gated by manage_woocommerce; failed-CSV retry is creation-only and won't finish rows that partially succeeded but need update. Translations: new strings introduced in this and prior phases (A's warning copy, A's M4 message, C's download / errors, D's progress strings, E's i18n keys) need .po updates + .mo regeneration. The user handles .mo regeneration; .po edits remain a follow-up. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • 5295ab7ab9 Phase D — batched imports & moves with disk staging — v1.7.0 Implements review-00-plan-00.md Phase D. Items addressed: * M1 — category import is now batched. A new studiou_wcpcm_import_parse action stages rows to a guarded uploads/studiou-wcpcm-staging/<token>.json file (index.php + .htaccess guards, 24h TTL), and a new studiou_wcpcm_import_batch action processes 10 rows per call. The JS controller polls until done and reports progress in the results panel. The legacy single-shot studiou_wcpcm_import action stays registered for back-compat but the bundled UI no longer calls it. * M2 — product move is now batched. studiou_wcpcm_move_products_start returns the source category's product IDs; studiou_wcpcm_move_products_chunk moves 25 at a time. The chunk handler uses wp_set_post_terms, which is idempotent, so a retried chunk is safe. The legacy single-shot studiou_wcpcm_move_products action stays registered for back-compat. * M4 (rework) — product importer no longer stages CSV rows in a WP transient. The transient was a single wp_options row and overflowed max_allowed_packet on large imports, surfacing as the misleading "Import data not found or expired". The new disk-streaming staging has no such ceiling and is shared with the category importer. The shared staging API is exposed as 5 static methods on Studiou_WC_Product_Manage_Product_Import: get_staging_dir, stage_rows, read_stage_slice, delete_stage, prune_staging. Code duplication between the two importers is contained to row-shape handling. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • Просмотр сравнение для этих 10 коммитов »

1 месяц назад

dvotruba запушил(а) метку 1.7.1.studiou-wc-product-cat-manage в dvotruba/qdr.app.woo.plugins

1 месяц назад

dvotruba запушил(а) 1.5.0.studiou-wc-product-cat-manage в dvotruba/qdr.app.woo.plugins

  • 4b7132cf5f regenerate .mo file
  • c2795aed19 Update .po files for v1.6.2 -> v1.7.1 strings Sweeps every translatable string introduced or rewritten across the review-00-plan Phase A-E commits and adds them to both .po files. Replaced (Phase A — M6 warning rewrite): * "This operation permanently deletes all media files that are not assigned to any media category and are not used as featured image, product gallery image, or attached to any post." -> the new long enumeration that lists what IS detected, including the v1.6.2 termmeta + customizer exclusions. * "WARNING: This operation will permanently delete all unused uncategorized media files from the server. This action cannot be undone!" -> the new short "WARNING: This action cannot be undone." Added — Phase A (M6 warning bullets, H4 ragged-row, M4 guard): * Detection-is-heuristic intro + 4 bullets (content HTML, ACF/meta, downloadable files, "delete media that nothing I can detect is using"). * "Row %1$d: column count mismatch ... Row skipped." * "Import too large to stage (%d rows) ..." Added — Phase C (H5): * "Invalid file" Added — Phase D (M1 + M4 rework): * "Failed to stage import data on disk (write error)." * "CSV contains no data rows." * "OK" * "Row %d: %s" Added — Phase E (L7, L1): * "Warning: %d variations have a sale price greater than the new regular price (sale > regular). Review the variations and adjust the sale price." * 6 JS-side i18n keys: selectBothCategories, moveNoProducts, importInitializing, importComplete, deletionSummary, importSummary. Project-Id-Version header bumped to 1.7.1 in both files. References updated to point at views/manipulations/tab-remove-unassigned.php (the v1.6.0 partial) for the M6 strings instead of the old aggregated views/manipulations.php. The .mo file regeneration is handled separately by the maintainer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • e9f250c14d Phase E — cleanup pass — v1.7.1 Implements review-00-plan-00.md Phase E. Items addressed: * M7 — Product importer success-path logs are now gated behind WP_DEBUG (Processing categories for X, Categories assigned, etc.). Failure-path logs (zero categories matched, term insert failed, category creation failed) stay always-on. Matches CLAUDE.md's "Only logs failures" policy. * M8 — find_or_create_category_by_name (the new name; old find_category_by_name is now a thin alias) caches the full product_cat term list in a private static after the first miss-path call, so subsequent rows reuse it instead of re-running get_terms. Newly created terms append into the cache so they're visible to later rows in the same request. * M9 — get_categories_with_counts_uncached() replaces the per-category count loop with a single GROUP BY query. The query joins wp_posts with the SAME filters get_category_product_count applies (post_type='product', post_status IN publish/private/draft), so trashed and draft products no longer inflate displayed counts. Zero- count categories survive the LEFT JOIN. * L2 — Product export row count now accumulates during generation (export_products gains a by-ref &$row_count out param), so multi-line description fields no longer inflate the displayed count via substr_count("\n"). * L4 — Runtime-generated versioned asset copies (admin-X.Y.Z.js etc.) moved from the plugin directory into uploads/studiou-wcpcm-cache/<rel>/. The plugin dir stays untouched; security scanners stop tripping; managed hosts with read-only plugin dirs work. index.php silence files written into the cache subdirs. * L7 — UPVP apply_variant_price now detects variations whose sale_price would be greater than the new regular_price after the update, logs a "STUDIOU WC UPVP:" warning per affected variation, and returns them in a sale_warnings response field for the dry-run / results UI to show. Does NOT auto-clamp the sale_price (operator- owned). * L1 — Five new i18n keys added (selectBothCategories, moveNoProducts, importInitializing, importComplete, deletionSummary, importSummary). The Phase-D batched flows already use studiouWcpcm.i18n.* with English fallbacks, so they pick up these keys automatically once the .po files are updated. * L6, L8 — doc-only notes added under a new "Security notes" section in CLAUDE.md: server-side image fetching is SSRF surface gated by manage_woocommerce; failed-CSV retry is creation-only and won't finish rows that partially succeeded but need update. Translations: new strings introduced in this and prior phases (A's warning copy, A's M4 message, C's download / errors, D's progress strings, E's i18n keys) need .po updates + .mo regeneration. The user handles .mo regeneration; .po edits remain a follow-up. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • 5295ab7ab9 Phase D — batched imports & moves with disk staging — v1.7.0 Implements review-00-plan-00.md Phase D. Items addressed: * M1 — category import is now batched. A new studiou_wcpcm_import_parse action stages rows to a guarded uploads/studiou-wcpcm-staging/<token>.json file (index.php + .htaccess guards, 24h TTL), and a new studiou_wcpcm_import_batch action processes 10 rows per call. The JS controller polls until done and reports progress in the results panel. The legacy single-shot studiou_wcpcm_import action stays registered for back-compat but the bundled UI no longer calls it. * M2 — product move is now batched. studiou_wcpcm_move_products_start returns the source category's product IDs; studiou_wcpcm_move_products_chunk moves 25 at a time. The chunk handler uses wp_set_post_terms, which is idempotent, so a retried chunk is safe. The legacy single-shot studiou_wcpcm_move_products action stays registered for back-compat. * M4 (rework) — product importer no longer stages CSV rows in a WP transient. The transient was a single wp_options row and overflowed max_allowed_packet on large imports, surfacing as the misleading "Import data not found or expired". The new disk-streaming staging has no such ceiling and is shared with the category importer. The shared staging API is exposed as 5 static methods on Studiou_WC_Product_Manage_Product_Import: get_staging_dir, stage_rows, read_stage_slice, delete_stage, prune_staging. Code duplication between the two importers is contained to row-shape handling. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
  • 286d2510db Phase C — gated product-export download — v1.6.4 Implements review-00-plan-00.md Phase C. Items addressed: * H5 — the product exporter no longer drops a public, never-cleaned CSV under uploads/. It now mirrors the category exporter pattern: - Files live in uploads/studiou-wcpcm-product-exports/ with an index.php silence file and an .htaccess deny rule written lazily on first use. - Filenames embed a 32-char hex token from random_bytes(16), so the path is unguessable even if directory listing leaks. - Downloads route through admin_init via a query-string action on the Product Export admin page. The handler verifies the studiou-wcpcm-product-export-download nonce, checks manage_woocommerce, validates the requested file matches the strict regex /^product-export-[a-f0-9]{32}\.csv$/, and confirms via realpath() that the resolved file lives inside the export dir (so a symlink can't escape). - Every new export prunes files older than 24 hours, so the directory can't grow without bound. No view or JS contract change — the response still includes a download_url; it's just an admin URL now. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

1 месяц назад

dvotruba создал новую ветку 1.5.0.studiou-wc-product-cat-manage в dvotruba/qdr.app.woo.plugins

1 месяц назад

dvotruba запушил(а) 1.3 в dvotruba/qdr.app.studiou.orders2printpack

  • 30cb1d2ecd Fix variant price reset on Import; bump version to 1.3.4 Import creates product variants with price 0. GetVariants() synced the variant list prices from the products, so it overwrote the predefined Cena prices with 0 and persisted them to settings on form close, forcing the user to re-enter every price after each import. A zero (unset) product price no longer overwrites an existing variant price; a genuine non-zero price still syncs as before. - ProductStorage.GetVariants: guard against zero-price overwrite - Add ProductStorageTests covering import price-preservation - Bump App AssemblyVersion/FileVersion/Version and Setup ProductVersion to 1.3.4 (new ProductCode/PackageCode, UpgradeCode kept) - Update root README.md and App/README.md changelog, add CLAUDE.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

1 месяц назад

dvotruba запушил(а) master в dvotruba/qdr.app.studiou.orders2printpack

  • 4783a9805b Merge branch '1.3' merge 1.3.4 version
  • 30cb1d2ecd Fix variant price reset on Import; bump version to 1.3.4 Import creates product variants with price 0. GetVariants() synced the variant list prices from the products, so it overwrote the predefined Cena prices with 0 and persisted them to settings on form close, forcing the user to re-enter every price after each import. A zero (unset) product price no longer overwrites an existing variant price; a genuine non-zero price still syncs as before. - ProductStorage.GetVariants: guard against zero-price overwrite - Add ProductStorageTests covering import price-preservation - Bump App AssemblyVersion/FileVersion/Version and Setup ProductVersion to 1.3.4 (new ProductCode/PackageCode, UpgradeCode kept) - Update root README.md and App/README.md changelog, add CLAUDE.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
  • 8c9758f9ae Merge branch '1.3' # Conflicts: # Setup/Setup.vdproj
  • add0b06b9e change version of setup to 1.3.3
  • 7ef7205769 add processing email tag in LabelPrint. Change version to 1.3.3
  • Просмотр сравнение для этих 11 коммитов »

1 месяц назад

dvotruba запушил(а) метку v1.3.4 в dvotruba/qdr.app.studiou.orders2printpack

1 месяц назад

dvotruba запушил(а) master в dvotruba/qdr.app.woo.plugins

  • ef1a350ab9 Merge branch '1.5.0.studiou-wc-product-cat-manage'
  • 89360f0acb Fix protected categories missing from manipulations dropdowns Since v1.6.0 the category list is fetched inside an admin-ajax request (tab partial loading). In that context the WooCommerce Protected Categories plugin filters get_terms() and hides protected categories, so they disappeared from every category dropdown/checklist on the Category Manipulations page. get_categories_with_counts_uncached() now queries the product_cat terms directly via $wpdb, bypassing all term-query filters, so the list always includes protected categories - admins need to operate on them here. Renamed the count transient key so the previously cached (filtered) list is discarded immediately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • beb4a570fe Document the release / version-bump process in CLAUDE.md Add a Release Process section listing every place the version must be bumped, and clarifying that the version-stamped asset filenames are generated automatically at runtime (gitignored, never renamed or committed by hand). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 20a8c110ab Serve admin assets under version-stamped filenames for cache busting studiou.cz strips the ?ver= query string from static assets, so a version bump alone never busts the browser cache and users had to hard-refresh after every update. get_cache_busted_asset_url() now serves admin CSS/JS under filenames that embed the plugin version (admin-1.6.0.js etc.). The versioned copy is auto-generated from the source admin.js/admin.css and refreshed whenever the source changes, so no manual renaming is needed. Falls back to the plain URL if the copy cannot be written. Versioned copies are runtime-generated build artifacts and gitignored. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • e2e117581c regenerate .mo file
  • Просмотр сравнение для этих 7 коммитов »

1 месяц назад

dvotruba запушил(а) метку 1.6.0.studiou-wc-product-cat-manage в dvotruba/qdr.app.woo.plugins

1 месяц назад

dvotruba запушил(а) 1.3.0.studiou-wc-ord-print-statuses в dvotruba/qdr.app.woo.plugins

2 месяцев назад

dvotruba запушил(а) master в dvotruba/qdr.app.woo.plugins

  • d6f2d7ccbf Release v1.5.0 — per-order-item print status feature Implements the feature described in docs/feature-order-item-status-analysis.md. Minor version bump because this is a new feature, not a bug-fix. What's new: - Four item-level statuses: pending-print (initial), in-print, done-print, skip-print. Stored as _print_status meta on each WC_Order_Item_Product in {$wpdb->prefix}woocommerce_order_itemmeta. Missing meta defaults to pending-print (lazy — no migration needed for existing orders). - "Print Status" column added to the order edit screen's Items table. Per-row <select> lets the operator change each product item's status manually. Non-product items show — and aren't editable. - Order → wc-in-print transitions automatically advance every pending-print item to in-print. Other item statuses are untouched. - Order → wc-completed transitions are gated: blocked when any product item is still pending-print or in-print. Blocked transitions revert to the previous status with an admin notice listing the unready count. Existing already-completed orders are unaffected. - Order activity feed records every item-status change ("Item #5 (Product A): Pending Print → Done Print.") and batch propagations ("3 line items advanced to In Print by order-status change."). - Delivered Protocol import calls advance_remaining_to_done() before each order's status flip so the completion guard is satisfied automatically. Per-order and cross-import notices report the count. - InPrint Protocol import benefits from the propagation listener without needing explicit per-item code. - Bulk action "Set Status to In Printing" now also propagates items via the listener (no Bulk_Actions_Manager change). "Set Status to Prepare to Printing" stays order-only. - CSV export adds prod_print_status column. The SQL LEFT JOINs woocommerce_order_itemmeta on order_item_id filtered to _print_status, with COALESCE(..., 'pending-print') for the lazy default. New class: - includes/class-order-item-status-manager.php — owns UI rendering, POST save, propagation/guard listener (priority 5 on woocommerce_order_status_changed, with $inside_self_revert flag for recursion safety), and the advance_pending_to_in / advance_remaining_to_done helpers consumed by import_delivered_protocol. Coupling rules summary (see README §"Per-order-item print status"): Order → wc-in-print → pending items advance to in-print Order → wc-completed → gated (no propagation, just blocks) All other transitions → no item change Item status changes → never propagate to the order Docs: - README "Changelog" extends with the 1.5.0 entry; new feature section with the coupling-rules table; CSV column list updated. - CLAUDE.md gets a new manager entry (#8) and a 1.5.0 Recent Changes block. - docs/translations.txt: 12 new EN→CS entries (status labels, column header, audit-note format, propagation/guard notices, Delivered Protocol advance summary). - languages/studiou-wc-ord-print-statuses-cs_CZ.po: Project-Id-Version bumped to 1.5.0; same new strings with Czech 3-form plurals. Known limitations carried into 1.5.0: classic order edit screen only — WC 10.x block-based order edit screen unsupported (tracked as phase 2). NOTE: .mo not rebuilt — run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 746676ccb0 Add implementation analysis for per-order-item print status (v1.5.0) Planning document for the proposed v1.5.0 feature — adding a per-line-item print status (pending-print / in-print / done-print / skip-print) with a combo box in the order edit screen and a completion guard. Key decisions captured in the doc: - The stakeholder dropped the original "order and item statuses are independent" requirement, so the analysis is structured around an explicit coupling-rules table (§3) rather than trying to reconcile a contradiction: - Order → wc-in-print: pending-print items advance to in-print (propagation, via the same listener used for the guard). - Order → wc-completed: gated — blocked if any product item is still pending-print or in-print. - All other order transitions, and any manual item-status change: no propagation. - Item statuses live in WC_Order_Item meta key `_print_status` (lazy default = pending-print, no migration needed). - A single new Order_Item_Status_Manager class handles UI rendering, POST save, propagation, and the guard via a combined listener on woocommerce_order_status_changed. - Protocol imports become natural consumers: InPrint Protocol gets propagation for free (no code change); Delivered Protocol must call advance_remaining_to_done() before the order completes so the guard is satisfied. - CSV export gains a prod_print_status column. - Estimated effort: 14–20 hours for Phase 1 (classic order edit screen only; block-based screen tracked as Phase 2). Open questions (§4) for stakeholder before implementation begins. No code changed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 54a62e7c7d Release v1.4.5 — resolve in-scope findings from revise-1.4.4 Adds docs/revise-1.4.4.md (fresh-eye review of 1.4.4) alongside the defensive fixes for the mediums and lows it raised. No critical/high findings in this round — the plugin is in a steady state. Medium: - normalise_csv_date fast path now validates ranges via checkdate() + hour/minute/second bounds. "2026-13-45T25:99" no longer matches and falls through to the DateTimeImmutable fallback, which throws. - emit_import_summary surfaces an info notice ("The CSV file contained no actionable rows (empty order_no column).") when both $updated and $errors are zero. Closes the silent-import path where dedup-by- order_no filters out every row. - csv_escape calls ltrim before the first-char check. Cells like " =CMD" with leading whitespace are no longer slipping past the formula-injection defence. Low: - parse_csv rejects CSVs whose normalised headers collide (e.g., "Order No" and "order_no" both → "order_no"). Logs the headers and returns empty; the downstream import then emits the existing "could not be parsed" notice. - bulk_set_print_status note dispatch lifted from binary ternary to an explicit array(slug => note) map with isset fallback. Future contributors adding a third status no longer risk inheriting the wrong note via an else-implicit branch. Deferred (documented, no code change): - §3.4 collation mismatch on terms.slug = postmeta.meta_value — added to README "Known limitations". Adding an explicit COLLATE clause risks breaking installs whose actual collation differs from any hardcoded value. - §4.3 main plugin instance lifecycle — architectural curiosity, no functional impact. - §4.4 woocommerce_missing_notice mid-request re-fire — edge case. Docs: - README "Changelog" extends with the 1.4.5 entry; "Known limitations" gains the collation note; pointer to docs/revise-1.4.4.md added. - CLAUDE.md picks up the 1.4.5 changes. - docs/revise-1.4.4.md is the fresh-eye review of 1.4.4; every finding carries an inline ✅ resolved / ⏸ deferred status marker. - docs/translations.txt: header bumped to 1.4.5; one new EN→CS entry for the "no actionable rows" notice. - languages/studiou-wc-ord-print-statuses-cs_CZ.po: Project-Id-Version bumped to 1.4.5; same new string added with Czech translation. NOTE: .mo not rebuilt — run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • ae7e82fc06 Release v1.4.4 — resolve every in-scope finding from revise-1.4.3 Adds docs/revise-1.4.3.md (fresh-eye review of 1.4.3) alongside the fixes for the issues it raised. High: - normalise_csv_date no longer shifts timezone-less CSV dates by the WP offset. The previous strtotime + wp_date pipeline interpreted naive input as UTC (because WP sets PHP timezone to UTC) and then formatted in WP-local, producing a 2-hour forward shift on Prague installs. Now uses pure-regex reformat for ISO-like inputs (no shift) and DateTimeImmutable(raw, wp_timezone)->setTimezone(wp_timezone) for the fallback. strtotime is gone from includes/ entirely — the recurring three-release timezone-bug pattern is structurally eliminated. Medium: - HPOS pre-flight check: get_orders_for_printing bails with a clear admin notice when {$wpdb->prefix}wc_orders is missing, parallel to the existing wc_order_product_lookup check. - bulk_set_print_status now passes an explanatory note to update_status ("Marked Prepare to Printing by bulk action." / "Marked In Printing by bulk action."), matching the import paths. Low: - Custom_Columns_Manager uses the WC_Order object directly when WC hands one to the column-content callback (HPOS path, no wc_get_order call) and memoises by ID under legacy CPT (per-request $order_cache). - Import_Manager::emit_import_summary gates the "%d orders updated successfully" notice on $updated > 0, matching notify_moved_count. - run_import switched from call_user_func to direct callable invocation. - before_woocommerce_init HPOS-compat callback converted from anonymous to named (studiou_wc_ord_print_statuses_declare_hpos_compat) so it can be remove_action-ed by other plugins / test harnesses. Docs: - README "Changelog" extends with the 1.4.4 entry; pointer to docs/revise-1.4.3.md added under Documentation. - CLAUDE.md picks up the 1.4.4 code changes. - docs/revise-1.4.3.md is the fresh-eye review of 1.4.3; every finding carries an inline ✅ resolved / ⏸ deferred status marker, plus a confirmation footnote that strtotime is now grep-clean. - docs/translations.txt: header bumped to 1.4.4; three new EN→CS entries (two bulk-action notes + HPOS-required notice). - languages/studiou-wc-ord-print-statuses-cs_CZ.po: Project-Id-Version bumped to 1.4.4; same three new translation entries. Deferred (carried over): listener save() re-entrancy (documented), bulk vs listener double-stamp (intentional), csv_escape on negative numbers (OWASP trade-off), "—" literal column edge case, \r-only line endings, HPOS search-filter live verification, Network: header, uninstall.php, custom-order-number plugin integration, register_post_status under HPOS, block-based order edit screen. NOTE: .mo not rebuilt — run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • e8a0088455 Refresh cs_CZ .po — sync translations with v1.4.3 source Brings the Czech translation source file up to date with the current plugin code. Project-Id-Version bumped 1.0 → 1.4.3, POT-Creation-Date / PO-Revision-Date set to 2026-05-12, Last-Translator filled in. Added strings that the .po was missing: - "Order %s is in a final state and was not updated." - "Required CSV headers: %s" - "Uploaded file is not accessible." - "File upload failed (error code %d)." - "CSV file could not be parsed or contained no data rows." - "Only .csv files are accepted." - "You do not have sufficient permissions to access this page." - "You do not have sufficient permissions to perform this action." - "External Order Date" (1.4.0 field) - "No exportable line items were found for the selected orders. CSV was not generated." - "The CSV export could not be streamed because output had already started. ..." - "Export requires the WooCommerce analytics lookup table ..." - "Marked In Printing by InPrint Protocol import." (1.4.3) - "Marked completed by Delivered Protocol import." (1.4.3) Promoted singletons to proper plurals (Czech 3-form: n==1 / 2-4 / 0+5+): - "%d order(s) updated successfully." - "%d order(s) moved to \"Prepare to Printing\"." - "%d order(s) moved to \"In Printing\"." - "%d order(s) skipped because (its/their) status is final ..." - "Prepare to Printing <span class=\"count\">(%s)</span>" (_n_noop) - "In Printing <span class=\"count\">(%s)</span>" (_n_noop) Added msgctxt for _x context-aware status labels: - msgctxt "Order status" / msgid "Prepare to Printing" - msgctxt "Order status" / msgid "In Printing" Format fixes: - "%d errors occurred: %s" → "%1$d errors occurred: %2$s" (matches source). - Double-quotes inside msgid properly escaped. Removed: the "Payment received ..." string — dead since 1.4.3 removed set_order_processing_status. NOTE: .mo not rebuilt. Run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • Просмотр сравнение для этих 34 коммитов »

2 месяцев назад

dvotruba запушил(а) метку 1.5.0.studiou-wc-ord-print-statuses в dvotruba/qdr.app.woo.plugins

2 месяцев назад

dvotruba запушил(а) 1.5.0.studiou-wc-ord-print-statuses в dvotruba/qdr.app.woo.plugins

  • e8a0088455 Refresh cs_CZ .po — sync translations with v1.4.3 source Brings the Czech translation source file up to date with the current plugin code. Project-Id-Version bumped 1.0 → 1.4.3, POT-Creation-Date / PO-Revision-Date set to 2026-05-12, Last-Translator filled in. Added strings that the .po was missing: - "Order %s is in a final state and was not updated." - "Required CSV headers: %s" - "Uploaded file is not accessible." - "File upload failed (error code %d)." - "CSV file could not be parsed or contained no data rows." - "Only .csv files are accepted." - "You do not have sufficient permissions to access this page." - "You do not have sufficient permissions to perform this action." - "External Order Date" (1.4.0 field) - "No exportable line items were found for the selected orders. CSV was not generated." - "The CSV export could not be streamed because output had already started. ..." - "Export requires the WooCommerce analytics lookup table ..." - "Marked In Printing by InPrint Protocol import." (1.4.3) - "Marked completed by Delivered Protocol import." (1.4.3) Promoted singletons to proper plurals (Czech 3-form: n==1 / 2-4 / 0+5+): - "%d order(s) updated successfully." - "%d order(s) moved to \"Prepare to Printing\"." - "%d order(s) moved to \"In Printing\"." - "%d order(s) skipped because (its/their) status is final ..." - "Prepare to Printing <span class=\"count\">(%s)</span>" (_n_noop) - "In Printing <span class=\"count\">(%s)</span>" (_n_noop) Added msgctxt for _x context-aware status labels: - msgctxt "Order status" / msgid "Prepare to Printing" - msgctxt "Order status" / msgid "In Printing" Format fixes: - "%d errors occurred: %s" → "%1$d errors occurred: %2$s" (matches source). - Double-quotes inside msgid properly escaped. Removed: the "Payment received ..." string — dead since 1.4.3 removed set_order_processing_status. NOTE: .mo not rebuilt. Run `wp i18n make-mo languages/` or compile via Poedit before the new Czech wording appears on the site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • b5fd5bb14f Release v1.4.3 — resolve every in-scope finding from revise-1.4.2 Adds docs/revise-1.4.2.md (fresh-eye review of 1.4.2) alongside the fixes for the issues it raised. High: - import_delivered_protocol now skips orders in cancelled/refunded/failed states with a per-row error notice. Previously the guard existed only in import_inprint_protocol; delivered-protocol imports could silently reactivate cancelled/refunded orders to "completed". completed is intentionally still allowed through (re-running the same delivered protocol is a benign no-op). - Import Protocols screen and POST handler switched from manage_woocommerce to edit_shop_orders so Shop Managers can run imports, matching the bulk-action capability requirement. Medium: - Studiou_DB_Manager::table_exists wraps the table name in $wpdb->esc_like before passing to $wpdb->prepare. SHOW TABLES LIKE treats _ as a single- character wildcard; conventional prefixes (wp_test_) hit that. - CSV formula-injection defence: csv_escape() prefixes any cell beginning with =, +, -, @, \t, or \r with a single quote, applied to every value in the export post-processing loop. - datetime_local_to_mysql validates ranges via checkdate() + hour/minute/ second bounds. Direct-POST or DevTools-edited bogus values are rejected. - Removed set_order_processing_status and its woocommerce_payment_complete hook — dead code on modern WC. WC_Order::payment_complete already sets the status before firing the action, so our handler was always either a no-op same-state update or a deliberate skip. Translation entry for the "Payment received..." note removed too. Low: - format_quantity normalises SUM(DECIMAL) — "2.0000" → "2", "2.5000" → "2.5". - Both import handlers pass an explanatory note to update_status and emit per-row UtilsLog::log entries (symmetric with the bulk-action path). - emit_import_summary deduplicates the error list before formatting; the numeric total still reflects the full error count. - UtilsLog::render_notices uses esc_html instead of wp_kses_post. All current notice call sites pass plain text; tighter API trust boundary. - array_filter in get_orders_for_printing uses an explicit > 0 callback. Docs: - README "Known limitations" gains two entries (Excel CS-locale CSV separator, trashed/draft products in historical orders). - CLAUDE.md picks up the 1.4.3 changes. - docs/revise-1.4.2.md is the new fresh-eye review of 1.4.2; every finding carries an inline ✅ resolved / ⏸ deferred status marker. - docs/translations.txt: dead "Payment received..." entry removed; two new strings ("Marked In Printing by InPrint Protocol import.", "Marked completed by Delivered Protocol import.") added. Deferred (carried over): HPOS search-filter live verification, block- based order edit screen, Network: plugin header, uninstall.php, custom- order-number plugin integration, register_post_status under HPOS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 1d6e0a0a06 Release v1.4.2 — resolve every in-scope finding from revise-1.4.1 Adds the new analytical review docs/revise-1.4.1.md (fresh-eye pass over 1.4.1) alongside the fixes for every in-scope item it raised. High: - Custom_Columns_Manager::format_meta_date no longer applies the WP-vs- server timezone offset twice (strtotime+date_i18n → DateTimeImmutable with wp_timezone + wp_date). The To/In Print Date columns now read correctly on UTC-server / non-UTC-WP installs. - Export SQL joins terms.slug against attribute_pa_format postmeta (WC stores the slug there, not the name). MIN(terms.name) still surfaces the human-readable display. - qty is now SUM(order_products.product_qty) instead of MIN. A single order may have multiple lookup rows for the same (product, variation) when the customer added it twice without cart-merge; MIN silently undercounted. Medium: - INNER JOIN on product_variations → LEFT JOIN. Simple (non-variable) products are no longer silently excluded from the export. - prod_img_url is resolved via wp_get_attachment_url(_thumbnail_id) in PHP after the query — drops wp_posts.guid (codex warns it isn't guaranteed to be a URL). Offloaded-media / multisite paths now work. - normalise_csv_date uses wp_date() to match current_time('mysql') elsewhere (was date(), server timezone). - Pre-flight check for wc_order_product_lookup — clear admin notice if WC Analytics is disabled instead of a cryptic SQL error. - SET SESSION group_concat_max_len uses GREATEST(@@SESSION..., 65535) so we never lower a higher pre-existing value. - Server-side .csv extension check on protocol uploads. Low: - Order_Status_Manager::add_custom_order_statuses_to_list appends custom statuses at the end if wc-processing was removed by another plugin. - parse_csv drops @fopen suppression; explicit error log instead. - add_import_submenu translates "Import Protocols" once into a local. Docs: - README gains a "Known limitations" section (HPOS search verification, variable-products-only, WC Analytics dep, block-based screen, no Network header, no uninstall, custom-order-number plugins, hardcoded attribute_pa_format, session-scoped group_concat_max_len) and a callout that order_no in CSVs is the WC internal order ID. - CLAUDE.md 1.3.2 footnote acknowledges the slug-not-name correction; "Key Database Operations" paragraph rewritten to reflect the current SQL shape. - docs/revise-1.4.1.md (new) is the fresh-eye review of 1.4.1; every finding carries an inline ✅ resolved / ⏸ deferred status marker. - docs/translations.txt: two new EN→CS entries for 1.4.2 strings. Deferred (carried over): live HPOS search-filter verification, Network: header, uninstall.php, block-based order edit screen, custom-order- number plugin integration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • f8b7de9317 Release v1.4.1 — resolve every in-scope finding from revise-1.4.0 Critical fixes: - Export SQL is now ONLY_FULL_GROUP_BY-safe (non-aggregated columns wrapped in MIN()); SET SESSION group_concat_max_len = 65535 before the query prevents silent prod_cat truncation. - parse_csv() strips a leading UTF-8 BOM (which the plugin's own exports ship for Excel-on-Windows), so export-then-reimport workflows work. - Order_Fields_Manager datetime round-trip is pure string reformat — no strtotime()/date(), no server-vs-WP timezone drift. Other resolved items: - output_csv() fails loudly via wp_die() when headers_sent(), logging the offending file:line instead of streaming CSV into a half-rendered page. - fputcsv/fgetcsv pass an explicit '' escape — no PHP 8.4 deprecation noise. - set_order_processing_status() records a single order note via update_status. - notify_moved_count() suppresses zero-count success notices. - normalise_csv_date() returns '' (and logs) on parse failure. - dedupe_by_order_no() is now case-insensitive. - Import_Manager::protocol_dispatch() centralises the per-protocol config; run_import() returns explicitly via redirect_back() on every non-happy branch (static-analysis friendly). - Order_Fields_Manager render + save driven from datetime_fields()/text_fields() maps; current_user_can('edit_shop_order') gate added on save. - Order_Status_Manager::handle_status_transitions carries a docblock explaining the intentional bulk-vs-listener double-stamp contract. - UtilsLog notice TTL bumped 60s → 300s. Documentation: - README, CLAUDE.md: 1.4.1 changelog entries with per-fix detail. - docs/revise-1.4.0.md: every finding annotated ✅ resolved / ⏸ deferred. - docs/translations.txt: merged payment-complete string updated; new CSV-export safety string added. .mo NOT rebuilt. Deferred (carried over): HPOS search-filter live verification, Network: header, uninstall.php, block-based order edit screen, wp_kses_post narrowing, per-tab race in render_notices. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
  • 395b9efb3d Release v1.4.0 — fix every finding from revise-1.3.2 + WC 10.7.0/WP 6.9.4 Code changes (all bugs catalogued in docs/revise-1.3.2.md are addressed): - Order_Search_Manager rewritten: drops broken parse_query/edit.php guard and column-as-search-field hooks; now uses woocommerce_shop_order_search_fields (legacy) and woocommerce_order_table_search_query_meta_keys (HPOS) with the correctly-spelled meta key. The standard "Search orders" box now finds orders by external_ref_ord_no. - Order_Status_Manager.handle_status_transitions writes through the WC_Order object instead of update_post_meta — HPOS-safe stamping of print dates. - set_order_processing_status guards to-print, in-print, and completed against late-payment demotion. - Bulk export is atomic: CSV is built before any status change; UTF-8 BOM and charset=utf-8 header for Excel-on-Windows correctness; nocache_headers(). - Export SQL now uses $wpdb->prepare() with %d placeholders and collapses multi-category products via GROUP_CONCAT(DISTINCT) + GROUP BY per line item. - CSV imports deduplicate by order_no (per the original spec), normalise header casing so both "Order No" and "order_no" work, validate $_FILES errors and is_uploaded_file(), skip orders in terminal statuses. - Bulk-action handler guards with current_user_can('edit_shop_orders'). - UtilsLog::log() guard relaxed to defined('WP_DEBUG') && WP_DEBUG; UtilsLog::message() implemented as per-user transient + admin_notices hook so bulk actions and imports produce visible feedback after the redirect. - parse_csv() drops the 1000-byte line cap, validates header row, normalises header casing, skips rows with column-count mismatch. - external_ref_ord_date is parsed via strtotime() and exposed in the Print Information panel on the order edit screen. - Custom_Columns_Manager parameter renamed $order_or_id; wc_get_order() handles both HPOS and legacy storage shapes. - Bootstrap: STUDIOU_WC_OPS_VERSION / STUDIOU_WC_OPS_FILE constants defined; text-domain loader pinned to plugins_loaded priority 5 so translations are loaded before any manager constructor evaluates _x()/_n_noop(). Documentation: - README.md: comprehensive 1.4.0 changelog, updated Print Information field list (adds external_ref_ord_date), reworded Search section, BOM/dedup notes. Pointer to docs/revise-1.3.2.md added. - CLAUDE.md: 1.4.0 entry under Recent Changes, corrected the misleading SQL-prepare-via-intval claim, expanded Logging section. - docs/translations.txt: extended with all strings previously missing (notices, errors, plurals, payment-complete notes). .mo NOT rebuilt; needs wp i18n make-mo or Poedit pass. - docs/revise-1.4.0.md: new analytical review of 1.4.0 covering newly introduced risks (GROUP BY under ONLY_FULL_GROUP_BY, BOM-in-imported-CSV, WP-vs-server timezone drift in datetime-local fields, etc.) plus a matrix mapping every 1.3.2 finding to its 1.4.0 outcome. Tested-against bump: WordPress 6.9.4, WooCommerce 10.7.0 (HPOS enabled). Plugin header, README requirements table, CLAUDE.md, and the revise-1.4.0 target-environment / verification-gaps sections updated accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

2 месяцев назад

dvotruba создал новую ветку 1.5.0.studiou-wc-ord-print-statuses в dvotruba/qdr.app.woo.plugins

2 месяцев назад