| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +defined('ABSPATH') || exit; | |
| 4 | + | |
| 3 | 5 | /* |
| 4 | 6 | * Global Modules Intialization |
| 5 | 7 | */ |
| 6 | 8 | (new \FluentBooking\App\Services\GlobalModules\GlobalModules())->register(); |
| @@ -13,10 +15,31 @@ | ||
| 13 | 15 | }); |
| 14 | 16 | |
| 15 | 17 | add_action('fluentcrm_loaded', function () { |
| 16 | 18 | (new \FluentBooking\App\Services\Integrations\FluentCRM\FluentCrmInit()); |
| 17 | - (new \FluentBooking\App\Services\Integrations\FluentCRM\Bootstrap()); | |
| 19 | + | |
| 20 | + add_action('init', function () { | |
| 21 | + (new \FluentBooking\App\Services\Integrations\FluentCRM\Bootstrap()); | |
| 22 | + }); | |
| 23 | + | |
| 18 | 24 | }); |
| 19 | 25 | |
| 20 | 26 | add_action('fluent_boards_loaded', function () { |
| 21 | - (new \FluentBooking\App\Services\Integrations\FluentBoards\Bootstrap()); | |
| 22 | -}); | |
| 27 | + add_action('init', function () { | |
| 28 | + (new \FluentBooking\App\Services\Integrations\FluentBoards\Bootstrap()); | |
| 29 | + }); | |
| 30 | +}); | |
| 31 | + | |
| 32 | +add_action('fluentcart_loaded', function () use ($app) { | |
| 33 | + add_action('init', function () use ($app) { | |
| 34 | + (new \FluentBooking\App\Services\Integrations\FluentCart\Bootstrap($app)); | |
| 35 | + }); | |
| 36 | +}); | |
| 37 | + | |
| 38 | +if (defined('ELEMENTOR_VERSION')) { | |
| 39 | + /* | |
| 40 | + * We will keep it for then time being for backward compatibility of Old Fluent Booking Pro | |
| 41 | + */ | |
| 42 | + if (!class_exists('\FluentBookingPro\App\Services\Integrations\Elementor\ElementorIntegration')) { | |
| 43 | + (new \FluentBooking\App\Services\Integrations\Elementor\ElementorIntegration())->register(); | |
| 44 | + } | |
| 45 | +} | |