Automattic\WooCommerce\Admin\API
ProductForm::register_routes
Register routes.
Method of the class: ProductForm{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ProductForm = new ProductForm(); $ProductForm->register_routes();
ProductForm::register_routes() ProductForm::register routes code WC 11.0.1
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( $this, 'get_form_config' ),
'permission_callback' => array( $this, 'get_product_form_permission_check' ),
),
'schema' => array( $this, 'get_public_item_schema' ),
)
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/fields',
array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( $this, 'get_fields' ),
'permission_callback' => array( $this, 'get_product_form_permission_check' ),
),
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}