← All changes
|
app/src/Controllers/Admin/Subscriptions/SubscriptionsController.php
+8
-7
4.6.2
→
2.6.1
View file →
| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace SureCart\Controllers\Admin\Subscriptions; |
| 4 | 4 | |
| 5 | 5 | use SureCart\Controllers\Admin\AdminController; |
| 6 | +use SureCart\Controllers\Admin\SubscriptionInsights\SubscriptionInsightsScriptsController; | |
| 6 | 7 | use SureCart\Controllers\Admin\Subscriptions\SubscriptionsListTable; |
| 7 | 8 | use SureCart\Controllers\Admin\Subscriptions\Scripts\EditScriptsController; |
| 8 | 9 | use SureCart\Controllers\Admin\Subscriptions\Scripts\ShowScriptsController; |
| 9 | 10 | |
| @@ -14,19 +15,19 @@ | ||
| 14 | 15 | /** |
| 15 | 16 | * Orders index. |
| 16 | 17 | */ |
| 17 | 18 | public function index() { |
| 19 | + // enqueue stats. | |
| 20 | + add_action( 'admin_enqueue_scripts', \SureCart::closure()->method( SubscriptionInsightsScriptsController::class, 'enqueue' ) ); | |
| 21 | + | |
| 18 | 22 | $table = new SubscriptionsListTable(); |
| 19 | 23 | $table->prepare_items(); |
| 20 | 24 | $this->withHeader( |
| 21 | - array( | |
| 22 | - 'breadcrumbs' => [ | |
| 23 | - 'subscriptions' => [ | |
| 24 | - 'title' => __( 'Subscriptions', 'surecart' ), | |
| 25 | - ], | |
| 25 | + [ | |
| 26 | + 'subscriptions' => [ | |
| 27 | + 'title' => __( 'Subscriptions', 'surecart' ), | |
| 26 | 28 | ], |
| 27 | - 'report_url' => SURECART_REPORTS_URL . 'subscriptions', | |
| 28 | - ) | |
| 29 | + ] | |
| 29 | 30 | ); |
| 30 | 31 | return \SureCart::view( 'admin/subscriptions/index' )->with( |
| 31 | 32 | [ |
| 32 | 33 | 'table' => $table, |