Automattic\WooCommerce\Internal\Admin\EmailPreview

EmailPreviewRestController::get_schema_with_message()privateWC 1.0

Get the schema for the POST send-preview and save-transient requests.

Method of the class: EmailPreviewRestController{}

No Hooks.

Return

Array[].

Usage

// private - for code of main (parent) class only
$result = $this->get_schema_with_message();

EmailPreviewRestController::get_schema_with_message() code WC 9.7.1

private function get_schema_with_message() {
	return array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'email-preview-with-message',
		'type'       => 'object',
		'properties' => array(
			'message' => array(
				'description' => __( 'A message indicating that the action completed successfully.', 'woocommerce' ),
				'type'        => 'string',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
		),
	);
}