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 месяцев назад