| @@ -153,10 +153,23 @@ | ||
| 153 | 153 | $this, |
| 154 | 154 | 'disco_display_plugin_admin_page_create_campaign', |
| 155 | 155 | ) |
| 156 | 156 | ); |
| 157 | + | |
| 157 | 158 | add_submenu_page( |
| 158 | 159 | 'disco-create-discount', |
| 160 | + __( 'Analytics', 'disco' ), | |
| 161 | + __( 'Analytics', 'disco' ) . ' <span class="disco-beta-badge">' . __( 'Beta', 'disco' ) . '</span>', | |
| 162 | + 'manage_woocommerce', | |
| 163 | + 'disco-analytics', | |
| 164 | + array( | |
| 165 | + $this, | |
| 166 | + 'disco_display_plugin_admin_page_analytics', | |
| 167 | + ) | |
| 168 | + ); | |
| 169 | + | |
| 170 | + add_submenu_page( | |
| 171 | + 'disco-create-discount', | |
| 159 | 172 | __( 'Settings', 'disco' ), |
| 160 | 173 | __( 'Settings', 'disco' ), |
| 161 | 174 | 'manage_woocommerce', |
| 162 | 175 | 'disco-settings', |
| @@ -186,8 +199,9 @@ | ||
| 186 | 199 | $this, |
| 187 | 200 | 'disco_display_plugin_admin_page_help_and_docs', |
| 188 | 201 | ) |
| 189 | 202 | ); |
| 203 | + | |
| 190 | 204 | if ( ! Disco::is_pro() ) { |
| 191 | 205 | add_submenu_page( |
| 192 | 206 | 'disco-create-discount', |
| 193 | 207 | __( 'Pro Plan', 'disco' ), |
| @@ -278,7 +292,17 @@ | ||
| 278 | 292 | * @since 1.0.0 |
| 279 | 293 | */ |
| 280 | 294 | public function disco_display_plugin_admin_page_compatible_plugin_list() { |
| 281 | 295 | include_once DISCO_PLUGIN_ROOT . 'backend/views/compatible_plugin_list.php'; |
| 296 | + } | |
| 297 | + | |
| 298 | + /** | |
| 299 | + * Render the Analytics page for this plugin. | |
| 300 | + * | |
| 301 | + * @return void | |
| 302 | + * @since 1.0.0 | |
| 303 | + */ | |
| 304 | + public function disco_display_plugin_admin_page_analytics() { | |
| 305 | + include_once DISCO_PLUGIN_ROOT . 'backend/views/analytics.php'; | |
| 282 | 306 | } |
| 283 | 307 | |
| 284 | 308 | } |