Automattic\WooCommerce\Admin\API

ProductForm::get_fields()publicWC 1.0

Get the form fields.

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

Хуков нет.

Возвращает

WP_REST_Response|WP_Error.

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

$ProductForm = new ProductForm();
$ProductForm->get_fields( $request );
$request(WP_REST_Request) (обязательный)
Full details about the request.

Код ProductForm::get_fields() WC 9.7.1

public function get_fields( $request ) {
	$json = array_map(
		function( $field ) {
			return $field->get_json();
		},
		FormFactory::get_fields()
	);

	return rest_ensure_response( $json );
}