Automattic\WooCommerce\Internal\Admin\EmailPreview

EmailPreviewRestController::get_schema_for_preview_subject()privateWC 1.0

Get the schema for the GET preview_subject request.

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

Хуков нет.

Возвращает

Массив[].

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

// private - только в коде основоного (родительского) класса
$result = $this->get_schema_for_preview_subject();

Код EmailPreviewRestController::get_schema_for_preview_subject() WC 9.6.2

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