Automattic\WooCommerce\Internal

RestApiControllerBase::handle_woocommerce_rest_api_get_rest_namespacespublicWC 1.0

Handle the woocommerce_rest_api_get_rest_namespaces filter to add ourselves to the list of REST API controllers registered by WooCommerce.

Method of the class: RestApiControllerBase{}

No Hooks.

Returns

Array. The updated list of WooCommerce REST API namespaces/controllers.

Usage

$RestApiControllerBase = new RestApiControllerBase();
$RestApiControllerBase->handle_woocommerce_rest_api_get_rest_namespaces( $namespaces ): array;
$namespaces(array) (required)
The original list of WooCommerce REST API namespaces/controllers.

RestApiControllerBase::handle_woocommerce_rest_api_get_rest_namespaces() code WC 11.0.0

public function handle_woocommerce_rest_api_get_rest_namespaces( array $namespaces ): array {
	$namespaces['wc/v3'][ $this->get_rest_api_namespace() ] = static::class;
	return $namespaces;
}