Automattic\WooCommerce\Admin\API
ProductForm::get_fields
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() ProductForm::get fields WC 11.0.0
public function get_fields( $request ) {
$json = array_map(
function( $field ) {
return $field->get_json();
},
FormFactory::get_fields()
);
return rest_ensure_response( $json );
}