PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / trunk
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler vtrunk
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
fluent-cart / app / Modules / Subscriptions / SubscriptionModule.php

SubscriptionModule.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler trunk, at app/Modules/Subscriptions/SubscriptionModule.php

38 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Modules\Subscriptions;
4
5 use FluentCart\App\App;
6 use FluentCart\App\Models\Subscription;
7 use FluentCart\App\Modules\Subscriptions\Services\Filter\SubscriptionFilter;
8 use FluentCart\Framework\Support\Arr;
9
10 class SubscriptionModule
11 {
12 public static function register()
13 {
14 $self = new static();
15 App::getInstance()->addAction('fluentcart_loaded', [$self, 'init']);
16 }
17
18 public function init($app)
19 {
20 $app->router->group(function ($router) {
21 require_once __DIR__ . '/Http/subscriptions-api.php';
22 });
23
24 (new \FluentCart\App\Modules\Subscriptions\Http\Handlers\AdminMenuHandler())->register();
25
26 // Checkout gateway capability gate — new subscription carts, renewals, and reactivations.
27 (new \FluentCart\App\Modules\Subscriptions\Services\SubscriptionGatewayGate())->register();
28
29 // Auto-charge engine for system (token-charged) subscription renewal invoices.
30 (new \FluentCart\App\Modules\Subscriptions\Services\SystemChargeService())->register();
31
32 add_filter('fluent_cart/admin_filter_options', function ($filterOptions, $args) {
33 $filterOptions['subscription_filter_options'] = SubscriptionFilter::getTableFilterOptions();
34 return $filterOptions;
35 }, 10, 2);
36 }
37 }
38