PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
← All changes | includes/core/rest-api/class-server.php +32 -4 2.8.16 → 3.13.3 View file →
@@ -1,9 +1,9 @@
1 1 <?php
2 2 /**
3 3 * Server
4 - *
5 - * @package
4 + *
5 + * @package
6 6 */
7 7 namespace WPFunnels\Rest;
8 8
9 9 class Server
@@ -52,8 +52,13 @@
52 52
53 53 foreach ($this->get_rest_namespaces() as $namespace => $controllers) {
54 54 foreach ($controllers as $controller_name => $controller_class) {
55 55 $controller_class_name = "WPFunnels\\Rest\\Controllers\\".$controller_class;
56 +
57 + if ( ! class_exists( $controller_class_name ) ) {
58 + continue;
59 + }
60 +
56 61 $this->controllers[ $namespace ][ $controller_name ] = new $controller_class_name();
57 62 $this->controllers[ $namespace ][ $controller_name ]->register_routes();
58 63 }
59 64 }
@@ -79,18 +84,41 @@
79 84 */
80 85 protected function get_controllers()
81 86 {
82 87 return apply_filters( 'wpfunnels/rest_api_controllers', array(
88 + 'mcp_settings' => 'McpSettingsController',
83 89 'settings' => 'SettingsController',
90 + // The React settings screen (?page=wpfunnels#/settings).
91 + 'settings_page' => 'SettingsPageController',
84 92 'templates_library' => 'TemplateLibraryController',
85 93 'order_bump' => 'OrderBumpController',
86 94 'funnel_control' => 'FunnelController',
95 + // Funnel listing screen (?page=wpfunnels#/funnels).
96 + 'funnel_list' => 'FunnelListController',
97 + 'offer' => 'OfferController',
87 98 'step_control' => 'StepController',
88 99 'remote_funnel' => 'RemoteFunnelsController',
89 100 'products' => 'ProductsController',
90 101 'gutenberg' => 'GutenbergCSSController',
91 - 'checkout' => 'CheckoutController'
92 - ));
102 + 'checkout' => 'CheckoutController',
103 + 'importexport' => 'ImportExportController',
104 + 'report' => 'DashboardController',
105 + 'plugin_installer' => 'PluginInstallerController',
106 + 'setup_wizard' => 'SetupWizardController',
107 + 'store_checkout' => 'StoreCheckoutController',
108 + /*
109 + * Two different controllers answer to automations, and WPFunnels Pro
110 + * overwrites the 'automation' key with its own CRM controller (see
111 + * wpfunnels_add_analytics_controller in wpfnl-pro.php). Keeping this
112 + * one under its own key means both register instead of the Pro one
113 + * silently replacing it — which is what left the wpfnl/v1 namespace
114 + * with no routes at all whenever Pro was active.
115 + */
116 + 'automation' => 'WpfnlAutomationController',
117 + 'automation_canvas_crud' => 'WpfnlAutomationController',
118 + 'ai_chat' => 'AiChatController',
119 + 'ai_generate' => 'SingleShotAiController',
120 + ));
93 121 }
94 122
95 123 /**
96 124 * Return the path to the package.