Automattic\WooCommerce\Internal\Orders

OrderActionsRestController::get_schema_for_email_templatespublicWC 1.0

Get the schema for the email_templates action.

Метод класса: OrderActionsRestController{}

Хуков нет.

Возвращает

Массив.

Использование

$OrderActionsRestController = new OrderActionsRestController();
$OrderActionsRestController->get_schema_for_email_templates(): array;

Код OrderActionsRestController::get_schema_for_email_templates() WC 9.9.4

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;
}