Automattic\WooCommerce\Admin\API

ProductForm::get_fieldspublicWC 1.0

Get the form fields.

Method of the class: ProductForm{}

No Hooks.

Returns

WP_REST_Response|WP_Error.

Usage

$ProductForm = new ProductForm();
$ProductForm->get_fields( $request );
$request(WP_REST_Request) (required)
Full details about the request.

ProductForm::get_fields() code WC 10.3.6

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

	return rest_ensure_response( $json );
}