WC_Brands::rest_api_register_routes
Register REST API route for /products/brands.
Method of the class: WC_Brands{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Brands = new WC_Brands(); $WC_Brands->rest_api_register_routes();
Changelog
| Since 9.4.0 | Introduced. |
WC_Brands::rest_api_register_routes() WC Brands::rest api register routes code WC 10.4.3
public function rest_api_register_routes() {
require_once WC()->plugin_path() . '/includes/rest-api/Controllers/Version2/class-wc-rest-product-brands-v2-controller.php';
require_once WC()->plugin_path() . '/includes/rest-api/Controllers/Version3/class-wc-rest-product-brands-controller.php';
$controllers = array(
'WC_REST_Product_Brands_V2_Controller',
'WC_REST_Product_Brands_Controller'
);
foreach ( $controllers as $controller ) {
( new $controller() )->register_routes();
}
}