its main Schema Type. * * @throws \Exception If the schema does not exist. * @param string $name Name of schema. * @param string $version API Version being requested. * @return AbstractRoute */ public function get( $name, $version = 'v1' ) { $route = $this->routes[ $version ][ $name ] ?? false; if ( ! $route ) { throw new \Exception( "{$name} {$version} route does not exist" ); } return new $route( $this->schema_controller, $this->schema_controller->get( $route::SCHEMA_TYPE, $route::SCHEMA_VERSION ) ); } /** * Get a route path without instantiating the corresponding RoutesController object. * * @throws \Exception If the schema does not exist. * * @param string $version API Version being requested. * @param string $controller Whether to return controller name. If false, returns empty array. Note: * When $controller param is true, the output should not be used directly in front-end code, to prevent class names from leaking. It's not a security issue necessarily, but it's not a good practice. * When $controller param is false, it currently returns and empty array. But it can be modified in future to return include more details about the route info that can be used in frontend. * * @return string[] List of route paths. */ public function get_all_routes( $version = 'v1', $controller = false ) { $routes = array(); foreach ( $this->routes[ $version ] as $key => $route_class ) { if ( ! method_exists( $route_class, 'get_path_regex' ) ) { throw new \Exception( esc_html( "{$route_class} route does not have a get_path_regex method" ) ); } $route_path = '/' . trailingslashit( self::$api_namespace ) . $version . $route_class::get_path_regex(); $routes[ $route_path ] = $controller ? $route_class : array(); } return $routes; } /** * Register defined list of routes with WordPress. * * @param string $version API Version being registered.. * @param string $namespace Overrides the default route namespace. */ protected function register_routes( $version = 'v1', $namespace = 'wc/store/v1' ) { if ( ! isset( $this->routes[ $version ] ) ) { return; } $route_identifiers = array_keys( $this->routes[ $version ] ); foreach ( $route_identifiers as $route ) { $route_instance = $this->get( $route, $version ); $route_instance->set_namespace( $namespace ); register_rest_route( $route_instance->get_namespace(), $route_instance->get_path(), $route_instance->get_args() ); } } }
Warning: Class "Automattic\WooCommerce\StoreApi\RoutesController" not found in /htdocs/wp-content/plugins/woocommerce/src/StoreApi/deprecated.php on line 73

Fatal error: Uncaught Error: Class "MailPoet\Segments\DynamicSegments\Filters\WooCommerceAverageSpent" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:4528 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4348): MailPoetGenerated\FreeCachedContainer->getWooCommerceAverageSpentService() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4141): MailPoetGenerated\FreeCachedContainer->getFilterFactoryService() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4031): MailPoetGenerated\FreeCachedContainer->getSendingQueuesRepositoryService() #3 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5088): MailPoetGenerated\FreeCachedContainer->getRenderer6Service() #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5098): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailCustomizerService() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5198): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailMailerService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5368): MailPoetGenerated\FreeCachedContainer->getSubscriberActionsService() #7 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2612): MailPoetGenerated\FreeCachedContainer->getCommentService() #8 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getHooks2Service() #9 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #10 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #11 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #12 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #13 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #14 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #15 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #16 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #17 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #18 /htdocs/index.php(17): require('/htdocs/wp-blog...') #19 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 4528