WCEmailTemplateChangeSummary::summarize │ public static │ WC 10.9.0
Produce a structured + localized summary of differences between the merchant's woo_email post and the current canonical core render.
Returned payload shape (documented for callers; typed as array<string, mixed> so internal helpers can return through it without expanding every union into the signature):
All deltas are framed as "what would happen if the merchant applied the update," i.e. the "yours" → "core" direction:
version_from — string — _wc_email_template_version meta on the post (may be empty).
version_to — string — registry-side current version.
source_hash_to — string — sha1 of the canonical core content for this email type. Mirrors the post's _wc_email_template_source_hash meta. Empty string in fallback / no-config paths where the core content can't be computed.
added_blocks — array<int, array{name:string, label:string, path:array<int|string>}> — blocks that would be added to the post by applying (in core, not in post). name is the post-alias-normalized block name (e.g. core/heading); label is its humanized form for display; path is the core-side index path.
removed_blocks — array<int, array{name:string, label:string, path:array<int|string>}> — blocks that would be removed from the post by applying (in post, not in core). Same field semantics as added_blocks; path is the post-side index path.
copy_changes — array<int, array{block:string, before:string, after:string, occurrence:int, total:int, path:array<int|string>, auto_resolvable?:bool}>. before is the merchant's current text; after is the canonical core text. path is the post-side index path. auto_resolvable is emitted only on the three-way path: true when only core changed since base (safe to auto-apply), false when both sides changed (true conflict). Absent on two-way fallback payloads.
structural_changes — array<int, array{kind:string, description:string, path?:array<int|string>}> — path is omitted for kind: 'reorder' entries.
summary_lines — string[] — pre-localized one-liners ready to render.
is_fallback — bool — true when the diff could not be produced.