PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 1.5.10
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v1.5.10
2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 1.7.2 All 33 releases
fluent-booking / app / Hooks / Handlers / ActivationHandler.php

ActivationHandler.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution 1.5.10, at app/Hooks/Handlers/ActivationHandler.php

39 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentBooking\App\Hooks\Handlers;
4
5 use FluentBooking\Framework\Foundation\Application;
6 use FluentBooking\Database\DBMigrator;
7 use FluentBooking\Database\DBSeeder;
8
9 class ActivationHandler
10 {
11 protected $app = null;
12
13 public function __construct(Application $app)
14 {
15 $this->app = $app;
16 }
17
18 public function handle($network_wide = false)
19 {
20 DBMigrator::run($network_wide);
21 DBSeeder::run();
22
23 $this->registerWpCron();
24 }
25
26 public function registerWpCron()
27 {
28 $fiveMinutesHook = 'fluent_booking_five_minutes_tasks';
29 $hourlyHook = 'fluent_booking_hourly_tasks';
30 $dailyHook = 'fluent_booking/daily_tasks';
31
32 if(function_exists('as_schedule_recurring_action')) {
33 as_schedule_recurring_action(time(), (60 * 5), $fiveMinutesHook, [], 'fluent-booking', true);
34 as_schedule_recurring_action(time(), (60 * 60), $hourlyHook, [], 'fluent-booking', true);
35 as_schedule_recurring_action(time(), (60 * 60 * 24), $dailyHook, [], 'fluent-booking', true);
36 }
37 }
38 }
39