Automattic\WooCommerce\Internal\EmailEditor
EmailApiController::get_change_summary_schema │ public │ WC 1.0
Get the schema for the change-summary endpoint response.
Method of the class: EmailApiController{}
No Hooks.
Returns
Array.
Usage
$EmailApiController = new EmailApiController(); $EmailApiController->get_change_summary_schema(): array;
EmailApiController::get_change_summary_schema() EmailApiController::get change summary schema code WC 11.0.0
public function get_change_summary_schema(): array {
return array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'woo_email_change_summary',
'type' => 'object',
'properties' => array(
'version_from' => array(
'description' => __( 'The template version stamped on the post (may be empty for pre-backfill posts).', 'woocommerce' ),
'type' => 'string',
'readonly' => true,
),
'version_to' => array(
'description' => __( 'The current core template version recorded in the sync registry.', 'woocommerce' ),
'type' => 'string',
'readonly' => true,
),
'added_blocks' => array(
'description' => __( 'Blocks that would be added to the merchant post if the update were applied (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 through the parsed block tree.', 'woocommerce' ),
'type' => 'array',
'items' => array(
'type' => 'object',
'properties' => array(
'name' => array( 'type' => 'string' ),
'label' => array( 'type' => 'string' ),
'path' => array(
'type' => 'array',
'items' => array( 'type' => array( 'integer', 'string' ) ),
),
),
),
'readonly' => true,
),
'removed_blocks' => array(
'description' => __( 'Blocks that would be removed from the merchant post if the update were applied (in post, not in core). Same fields as `added_blocks`; `path` is the post-side index path.', 'woocommerce' ),
'type' => 'array',
'items' => array(
'type' => 'object',
'properties' => array(
'name' => array( 'type' => 'string' ),
'label' => array( 'type' => 'string' ),
'path' => array(
'type' => 'array',
'items' => array( 'type' => array( 'integer', 'string' ) ),
),
),
),
'readonly' => true,
),
'copy_changes' => array(
'description' => __( 'Block-level copy edits, truncated to 120 chars per side. `before` is the merchant\'s current text; `after` is the canonical core text. `path` is the post-side index path.', 'woocommerce' ),
'type' => 'array',
'items' => array(
'type' => 'object',
'properties' => array(
'block' => array( 'type' => 'string' ),
'before' => array( 'type' => 'string' ),
'after' => array( 'type' => 'string' ),
'occurrence' => array( 'type' => 'integer' ),
'total' => array( 'type' => 'integer' ),
'path' => array(
'type' => 'array',
'items' => array( 'type' => array( 'integer', 'string' ) ),
),
),
),
'readonly' => true,
),
'structural_changes' => array(
'description' => __( 'Structural deltas (reorder / nest) between the two trees. `path` is omitted on `kind: "reorder"` entries.', 'woocommerce' ),
'type' => 'array',
'items' => array(
'type' => 'object',
'properties' => array(
'kind' => array( 'type' => 'string' ),
'description' => array( 'type' => 'string' ),
'path' => array(
'type' => 'array',
'items' => array( 'type' => array( 'integer', 'string' ) ),
),
),
),
'readonly' => true,
),
'summary_lines' => array(
'description' => __( 'Pre-localized one-liners ready for direct render.', 'woocommerce' ),
'type' => 'array',
'items' => array( 'type' => 'string' ),
'readonly' => true,
),
'is_fallback' => array(
'description' => __( 'True when the diff could not be produced and a generic message is returned instead.', 'woocommerce' ),
'type' => 'boolean',
'readonly' => true,
),
'cache_hit' => array(
'description' => __( 'Diagnostic flag indicating whether the response came from the transient cache.', 'woocommerce' ),
'type' => 'boolean',
'readonly' => true,
),
),
);
}