Introduce woocommerce_rest_api_get_rest_namespaces filter
This commit is contained in:
parent
013934d8b7
commit
ec40302980
|
@ -57,13 +57,15 @@ class RestApi {
|
||||||
* @return array List of Namespaces and Main controller classes.
|
* @return array List of Namespaces and Main controller classes.
|
||||||
*/
|
*/
|
||||||
protected function get_rest_namespaces() {
|
protected function get_rest_namespaces() {
|
||||||
return [
|
return apply_filters(
|
||||||
|
'woocommerce_rest_api_get_rest_namespaces',
|
||||||
|
[
|
||||||
'wc/v1' => 'WC_REST_Controllers_V1',
|
'wc/v1' => 'WC_REST_Controllers_V1',
|
||||||
'wc/v2' => 'WC_REST_Controllers_V2',
|
'wc/v2' => 'WC_REST_Controllers_V2',
|
||||||
'wc/v3' => 'WC_REST_Controllers_V3',
|
'wc/v3' => 'WC_REST_Controllers_V3',
|
||||||
'wc/v4' => '\WooCommerce\RestApi\Version4\Controllers',
|
'wc/v4' => '\WooCommerce\RestApi\Version4\Controllers',
|
||||||
'wc-blocks/v1' => 'WC_REST_Blocks_Controllers',
|
]
|
||||||
];
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue