WC_Brands::rest_api_register_routes()
Register REST API route for /products/brands.
Метод класса: WC_Brands{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Brands = new WC_Brands(); $WC_Brands->rest_api_register_routes();
Список изменений
С версии 9.4.0 | Введена. |
Код WC_Brands::rest_api_register_routes() WC Brands::rest api register routes WC 9.4.2
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(); } }