Automattic\WooCommerce\Internal\Admin\EmailPreview

EmailPreviewRestController::get_args_for_preview_subject()privateWC 1.0

Get the accepted arguments 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_args_for_preview_subject();

EmailPreviewRestController::get_args_for_preview_subject() code WC 9.7.1

private function get_args_for_preview_subject() {
	return array(
		'type' => array(
			'description'       => __( 'The email type to get subject for.', 'woocommerce' ),
			'type'              => 'string',
			'required'          => true,
			'validate_callback' => fn( $key ) => $this->validate_email_type( $key ),
			'sanitize_callback' => 'sanitize_text_field',
		),
	);
}