Automattic\WooCommerce\Internal\EmailEditor
EmailApiController::get_apply_schema
Get the schema for the apply endpoint response.
Method of the class: EmailApiController{}
No Hooks.
Returns
Array.
Usage
$EmailApiController = new EmailApiController(); $EmailApiController->get_apply_schema(): array;
EmailApiController::get_apply_schema() EmailApiController::get apply schema code WC 10.9.1
public function get_apply_schema(): array {
return array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'woo_email_apply',
'type' => 'object',
'properties' => array(
'merged_content' => array(
'description' => __( 'The merged block content written to the post. May differ from the input `post_content` even when every choice was `keep_yours` — the namespace-alias migration (see `aliases_migrated`) rewrites legacy block names unconditionally.', 'woocommerce' ),
'type' => 'string',
'readonly' => true,
),
'revision_id' => array(
'description' => __( 'A UUID identifying the pre-apply snapshot. Use as the revision_id on a subsequent /undo call.', 'woocommerce' ),
'type' => 'string',
'readonly' => true,
),
'version_to' => array(
'description' => __( 'The core template version stamped on the post after applying.', 'woocommerce' ),
'type' => 'string',
'readonly' => true,
),
'status' => array(
'description' => __( 'The post-apply status (always `applied` on success).', 'woocommerce' ),
'type' => 'string',
'readonly' => true,
),
'structural_skipped' => array(
'description' => __( 'True when one or more structural deltas (nest / reorder) existed in the diff but were not applied. v1 punts structural changes; the merchant\'s structure is preserved.', 'woocommerce' ),
'type' => 'boolean',
'readonly' => true,
),
'aliases_migrated' => array(
'description' => __( 'List of deprecated block-name aliases rewritten to their canonical form during the apply (e.g. `["woo/email-content"]`). Empty when no migration was needed. Targeted to known deprecated aliases only.', 'woocommerce' ),
'type' => 'array',
'items' => array( 'type' => 'string' ),
'readonly' => true,
),
),
);
}