woocommerce_rest_api_get_rest_namespaces filter-hook . WC 1.0
Get API namespaces - new namespaces should be registered here.
Usage
add_filter( 'woocommerce_rest_api_get_rest_namespaces', 'filter_function_name_8407' ); function filter_function_name_8407( $array ){ // filter... return $array; }
- $array
- -
Where the hook is called
woocommerce_rest_api_get_rest_namespaces
woocommerce/includes/rest-api/Server.php 52-59
return apply_filters( 'woocommerce_rest_api_get_rest_namespaces', array( 'wc/v1' => $this->get_v1_controllers(), 'wc/v2' => $this->get_v2_controllers(), 'wc/v3' => $this->get_v3_controllers(), ) );
Where in WP core the hook is used WooCommerce
woocommerce/includes/wccom-site/class-wc-wccom-site.php 30
add_action( 'woocommerce_rest_api_get_rest_namespaces', array( __CLASS__, 'register_rest_namespace' ) );