* @link https://webappick.com * @license https://opensource.org/licenses/gpl-license.php GNU Public License * @category Rest */ class AnalyticsApi extends WP_REST_Controller { //phpcs:ignore /** * The route base name for analytics endpoints. * * @since 1.1.13 */ public const ROUTE_NAME = 'analytics'; /** * AnalyticsApi constructor. * * Sets the namespace and rest base for all analytics routes. */ public function __construct() { $this->namespace = Api::NAMESPACE_NAME . '/' . Api::VERSION; $this->rest_base = self::ROUTE_NAME; } /** * Delegates route registration to each analytics sub-controller. * * @return void */ public function register_routes() { //phpcs:ignore ( new IntentApi )->register_routes(); ( new RevenueChartApi )->register_routes(); ( new SummaryApi )->register_routes(); ( new CampaignsApi )->register_routes(); ( new ProductsApi )->register_routes(); ( new OrdersApi )->register_routes(); ( new CustomersApi )->register_routes(); } }