Automattic\WooCommerce\Internal\Admin\EmailPreview

EmailPreviewRestController::get_schema_for_preview_subject()privateWC 1.0

Get the schema for the GET preview_subject request.

Method of the class: EmailPreviewRestController{}

No Hooks.

Return

Array[].

Usage

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

EmailPreviewRestController::get_schema_for_preview_subject() code WC 9.7.1

private function get_schema_for_preview_subject() {
	return array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'email-preview-subject',
		'type'       => 'object',
		'properties' => array(
			'subject' => array(
				'description' => __( 'A subject for provided email type after filters are applied and placeholders replaced.', 'woocommerce' ),
				'type'        => 'string',
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
		),
	);
}