| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentBooking\App\Hooks\Handlers; |
| 4 |
|
| 5 |
use FluentBooking\Framework\Foundation\Application; |
| 6 |
|
| 7 |
class DeactivationHandler |
| 8 |
{ |
| 9 |
protected $app = null; |
| 10 |
|
| 11 |
public function __construct(Application $app) |
| 12 |
{ |
| 13 |
$this->app = $app; |
| 14 |
} |
| 15 |
|
| 16 |
public function handle() |
| 17 |
{ |
| 18 |
if(function_exists('\as_unschedule_all_actions')) { |
| 19 |
\as_unschedule_all_actions('fluent_booking_five_minutes_tasks'); |
| 20 |
\as_unschedule_all_actions('fluent_booking_hourly_tasks'); |
| 21 |
\as_unschedule_all_actions('fluent_booking/daily_tasks'); |
| 22 |
} |
| 23 |
|
| 24 |
wp_clear_scheduled_hook('fluent_booking_five_minutes_tasks'); |
| 25 |
wp_clear_scheduled_hook('fluent_booking_hourly_tasks'); |
| 26 |
wp_clear_scheduled_hook('fluent_booking/daily_tasks'); |
| 27 |
} |
| 28 |
|
| 29 |
} |
| 30 |
|