# fluent-booking/1.5.21/app/Hooks/Handlers/IntegrationHandlers.php

Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution, version 1.5.21. 37 lines.

- Page: https://pluginprobe.com/plugins/fluent-booking/1.5.21/code/app/Hooks/Handlers/IntegrationHandlers.php
- Raw: https://pluginprobe.com/plugins/fluent-booking/1.5.21/raw/app/Hooks/Handlers/IntegrationHandlers.php
- Modified: 2024-07-16T14:25:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-booking/1.5.21/code/app/Hooks/Handlers/IntegrationHandlers.php#L10-L20`.

```php
<?php

namespace FluentBooking\App\Hooks\Handlers;

use FluentBooking\App\Models\Booking;
use FluentBooking\App\Models\CalendarSlot;

class IntegrationHandlers
{
    public function boot()
    {
        add_action('fluent_booking/after_booking_scheduled', array($this, 'pushScheduledToQueue'), 10, 2);
        add_action('fluent_booking/run_booking_integrations_for_scheduled', [$this, 'runForScheduledIntegrations'], 10, 2);
    }

    public function pushScheduledToQueue($booking, $slot)
    {
        as_enqueue_async_action('fluent_booking/run_booking_integrations_for_scheduled', [
            $booking->id,
            $slot->id
        ], 'fluent-booking');
    }

    public function runForScheduledIntegrations($bookingId, $slotId)
    {
        $booking = Booking::find($bookingId);
        $slot = CalendarSlot::find($slotId);

        if (!$booking || !$slot) {
            return;
        }

        // We will run the integrations for the calendar

    }
}

```
