WC_REST_Product_Shipping_Classes_Controller::register_routes
Register the routes for product reviews.
Method of the class: WC_REST_Product_Shipping_Classes_Controller{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_REST_Product_Shipping_Classes_Controller = new WC_REST_Product_Shipping_Classes_Controller(); $WC_REST_Product_Shipping_Classes_Controller->register_routes();
WC_REST_Product_Shipping_Classes_Controller::register_routes() WC REST Product Shipping Classes Controller::register routes code WC 10.3.6
public function register_routes() {
parent::register_routes();
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/slug-suggestion',
array(
'args' => array(
'name' => array(
'description' => __( 'Suggest a slug for the term.', 'woocommerce' ),
'type' => 'string',
),
),
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'suggest_slug' ),
'permission_callback' => array( $this, 'get_item_permissions_check' ),
'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
),
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}