Automattic\WooCommerce\Internal\Orders
OrderActionsRestController::get_schema_for_email_templates
Get the schema for the email_templates action.
Method of the class: OrderActionsRestController{}
No Hooks.
Returns
Array.
Usage
$OrderActionsRestController = new OrderActionsRestController(); $OrderActionsRestController->get_schema_for_email_templates(): array;
OrderActionsRestController::get_schema_for_email_templates() OrderActionsRestController::get schema for email templates code WC 11.0.1
public function get_schema_for_email_templates(): array {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => __( 'Email Template', 'woocommerce' ),
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'A unique ID string for the email template.', 'woocommerce' ),
'type' => 'string',
'enum' => $this->get_template_id_enum(),
'context' => array( 'view', 'embed' ),
),
'title' => array(
'description' => __( 'The display name of the email template.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
),
'description' => array(
'description' => __( 'A description of the purpose of the email template.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
),
),
);
return $schema;
}