V5 is live

UP TO

60% OFF
Hot December Sale
Launch Sale
0 DAYS
:
0 HOURS
:
0 MINUTES
:
0 SECONDS
GET NOW percent icon

Back-end Hooks

Tap into Booknetic core and SaaS events with WordPress-style actions and filters to customize behavior.

Version:
Categories

Booknetic includes a broad set of WordPress-compatible actions and filters that let developers extend, customize, and integrate the plugin without modifying core files. The hook system follows the familiar WordPress do_action() and apply_filters() pattern, so if you already work with WordPress plugin development, the structure will feel natural.

Backend hooks are the main extension layer for reacting to lifecycle events, modifying data before it is saved or rendered, registering addons, controlling permissions, and integrating with external systems such as CRMs, calendars, payment tools, and custom admin interfaces.

How Hooks Work

Booknetic uses two hook types:

  • Actions let you run custom logic when a specific event happens, such as when an appointment is created, a payment is confirmed, or a customer is deleted.
  • Filters let you modify a value before Booknetic uses or returns it, such as appointment insert data, calendar event data, booking panel assets, or capability checks.

Registering a Hook Listener

// Listen to an action
add_action('bkntc_appointment_created', function ($appointmentData) {
    // Your custom logic here
}, 10, 1);

// Listen to a filter
add_filter('bkntc_appointment_insert_data', function ($data) {
    $data['notes'] = 'Auto-generated note';
    return $data; // Always return the modified value
}, 10, 1);

Filters must always return a value. If you forget to return the modified value, the data will be lost and may cause errors.

Hook Naming Convention

All Booknetic hooks follow a consistent prefix-based naming pattern:

PrefixScope
bkntc_Core plugin hooks
bkntcsaas_SaaS module hooks

Actions

Actions are used when you want to react to something that has happened inside Booknetic.

Initialization & Bootstrap

bkntc_init

Fired after Booknetic is fully loaded and initialized. Use this hook when your custom code depends on Booknetic being available.

Parameters: None

add_action('bkntc_init', function () {
    // Booknetic is ready, register your custom logic
});

bkntc_frontend

Fired when a frontend page containing the booking panel is loaded.

Parameters: None

add_action('bkntc_frontend', function () {
    // Enqueue custom frontend scripts or styles
    wp_enqueue_script('my-custom-script', plugins_url('assets/custom.js', __FILE__));
});

bkntc_backend

Fired when the Booknetic admin panel is loaded.

Parameters: None

add_action('bkntc_backend', function () {
    // Add custom admin functionality
});

bkntc_cronjob

Fired during Booknetic cron job execution.

Parameters: None

Customer Actions

bkntc_customer_created

Fired when a new customer is created.

Parameters:

ParameterTypeDescription
$customer_idintThe ID of the newly created customer
$wp_passwordstringThe WordPress user password if a WordPress user was created
add_action('bkntc_customer_created', function ($customerId, $wpPassword) {
    // Send a welcome email, sync to CRM, etc.
    error_log("New customer created: #$customerId");
}, 10, 2);

bkntc_customer_saved

Fired after customer data is saved, both on create and update.

Parameters:

ParameterTypeDescription
$customer_idintThe ID of the saved customer
add_action('bkntc_customer_saved', function ($customerId) {
    // Sync updated customer data to external system
}, 10, 1);

bkntc_customer_before_edit

Fired before a customer record is updated. This is useful when you need to capture the old state before changes are applied.

Parameters:

ParameterTypeDescription
$customer_idintThe ID of the customer being edited

bkntc_customer_deleted

Fired when a customer is deleted.

Parameters:

ParameterTypeDescription
$customer_idintThe ID of the deleted customer
add_action('bkntc_customer_deleted', function ($customerId) {
    // Clean up related data in external systems
}, 10, 1);

bkntc_customer_sign_up_confirm

Fired when a customer confirms signup through email verification.

Parameters:

ParameterTypeDescription
$tokenstringThe confirmation token
$customer_idintThe ID of the confirmed customer

bkntc_customer_forgot_password

Fired when a customer requests a password reset.

Parameters:

ParameterTypeDescription
$tokenstringThe password reset token
$customer_idintThe ID of the customer

bkntc_customer_reset_password

Fired after a customer password has been successfully reset.

Parameters:

ParameterTypeDescription
$customer_idintThe ID of the customer

Appointment Actions

bkntc_appointment_created

Fired when a new appointment is created, whether from the frontend booking panel or the backend admin side.

Parameters:

ParameterTypeDescription
$appointment_dataAppointmentRequestDataThe appointment request data object containing all appointment details

AppointmentRequestData (BookneticApp\Backend\Appointments\Helpers\AppointmentRequestData) provides access to:

PropertyTypeDescription
->appointmentIdintThe created appointment ID
->serviceIdintSelected service ID
->staffIdintAssigned staff ID
->locationIdintSelected location ID
->customerIdintCustomer ID
->datestringAppointment date in Y-m-d format
->startTimestringStart time in H:i format
->endTimestringEnd time in H:i format
->paymentMethodstringPayment method key
->serviceInfService|CollectionFull service model object
->staffInfStaff|CollectionFull staff model object
->locationInfLocation|CollectionFull location model object
->appointmentInfAppointment|CollectionFull appointment model object
add_action('bkntc_appointment_created', function (AppointmentRequestData $appointmentData) {
    $appointmentId = $appointmentData->appointmentId;
    $serviceId = $appointmentData->serviceId;
    $customerId = $appointmentData->customerId;
    $serviceName = $appointmentData->serviceInf->name;

    // Send notification, sync to external calendar, etc.
}, 10, 1);

bkntc_backend_appointment_created

Fired specifically when an appointment is created from the admin panel, not from the frontend booking panel.

Parameters:

ParameterTypeDescription
$appointment_dataAppointmentRequestDataThe appointment request data object

bkntc_appointment_before_edit

Fired before an existing appointment is updated. Use this when you need to inspect or capture the current state before changes are applied.

Parameters:

ParameterTypeDescription
$appointment_objAppointmentRequestDataThe appointment request data object before modification
add_action('bkntc_appointment_before_edit', function (AppointmentRequestData $appointmentObj) {
    // Store old state for comparison
    $oldStatus = $appointmentObj->appointmentInf->status;
    $oldStaffId = $appointmentObj->staffId;
}, 10, 1);

bkntc_appointment_after_edit

Fired after an appointment has been updated.

Parameters:

ParameterTypeDescription
$appointment_objAppointmentRequestDataThe updated appointment request data object

bkntc_appointment_before_mutation

Fired before an appointment undergoes any change. This includes status changes, edits, rescheduling, payment confirmation, and deletion. This is a general-purpose “before change” hook.

Parameters:

ParameterTypeDescription
$appointment_idint|nullThe ID of the appointment. May be null when called during new appointment creation in the payment confirmation flow

This hook fires in these contexts:

  • Status changes such as approve, cancel, reject, and similar transitions
  • Appointment edits such as date, time, staff, or service changes
  • Appointment rescheduling
  • Payment confirmation when status is updated after payment
  • Appointment deletion, before bkntc_appointment_deleted
add_action('bkntc_appointment_before_mutation', function ($appointmentId) {
    if ($appointmentId === null) return;

    // Capture the current state before it changes
    $appointment = \BookneticApp\Models\Appointment::get($appointmentId);
    // Store old status, sync with external systems, etc.
}, 10, 1);

bkntc_appointment_after_mutation

Fired after an appointment has undergone a change. Like bkntc_appointment_before_mutation, this hook fires for status changes, edits, rescheduling, payment confirmation, and deletion. This is one of the most frequently used hooks in Booknetic. Calendar sync addons, video meeting addons, and logging addons commonly rely on it.

Parameters:

ParameterTypeDescription
$appointment_idint|nullThe ID of the appointment. Will be null when the appointment was deleted

When this hook fires during deletion, $appointment_id is null because the record is about to be removed. If you need the real appointment ID before deletion, use bkntc_appointment_before_mutation. If you need deletion-specific logic, use bkntc_appointment_deleted.

add_action('bkntc_appointment_after_mutation', function ($appointmentId) {
    if ($appointmentId === null) {
        // Appointment was deleted — handle cleanup
        return;
    }

    // Sync with Google Calendar, create Zoom meeting, log changes, etc.
    $appointment = \BookneticApp\Models\Appointment::get($appointmentId);
}, 10, 1);

bkntc_appointment_deleted

Fired when an appointment is deleted. This hook runs after bkntc_appointment_before_mutation and bkntc_appointment_after_mutation have already been called for the deletion.

Parameters:

ParameterTypeDescription
$appointment_idintThe ID of the deleted appointment
add_action('bkntc_appointment_deleted', function ($appointmentId) {
    // Clean up related data in external systems
    // Note: the appointment record may already be deleted from the database at this point
}, 10, 1);

bkntc_validate_appointment_reschedule

Fired during the validation phase of an appointment reschedule.

Parameters:

ParameterTypeDescription
$appointment_arrarrayThe appointment reschedule data

Appointment Request Actions

These hooks run during the booking flow while appointment request data is loaded, processed, and validated.

bkntc_appointment_request_data_load

Fired when appointment request data is loaded for a single booking request.

Parameters:

ParameterTypeDescription
$appointment_objAppointmentRequestDataThe appointment request data object

bkntc_appointment_requests_load

Fired after all appointment requests have been loaded, such as when a cart contains multiple bookings.

Parameters: None

bkntc_appointment_requests_validate

Fired during validation of the full appointment request collection.

Parameters:

ParameterTypeDescription
$appointment_requestsAppointmentRequestsThe BookneticApp\Backend\Appointments\Helpers\AppointmentRequests instance containing all booking requests

bkntc_after_appointment_requests_validate

Fired after appointment request validation is completed.

Parameters:

ParameterTypeDescription
$appointment_requestsAppointmentRequestsThe BookneticApp\Backend\Appointments\Helpers\AppointmentRequests instance

bkntc_appointment_request_before_data_validate

Fired before a single appointment request data entry is validated.

Parameters:

ParameterTypeDescription
$appointment_request_dataAppointmentRequestDataThe BookneticApp\Backend\Appointments\Helpers\AppointmentRequestData instance

bkntc_appointment_request_data_validate

Fired during validation of a single appointment request data entry.

Parameters:

ParameterTypeDescription
$appointment_request_dataAppointmentRequestDataThe BookneticApp\Backend\Appointments\Helpers\AppointmentRequestData instance

bkntc_handle_any_staff_on_step

Fired when “Any staff” is selected during the booking flow, allowing you to customize staff assignment behavior.

Parameters:

ParameterTypeDescription
$steps_arrarrayThe booking steps array

bkntc_booking_step_confirmation_validation

Fired during confirmation step validation in the booking panel.

Parameters: None

Payment Actions

bkntc_payment_confirmed

Fired when payment is confirmed for an appointment.

Parameters:

ParameterTypeDescription
$appointment_idintThe ID of the appointment
$methodstringOptional payment method such as 'payment_link'
add_action('bkntc_payment_confirmed', function ($appointmentId, $method = null) {
    // Generate invoice, send receipt, etc.
}, 10, 2);

bkntc_payment_completed

Fired when a payment flow is fully completed, including gateway confirmation.

Parameters:

ParameterTypeDescription
$statusstringThe payment status
$custom_datamixedCustom data passed through the payment flow
$methodstringThe payment method identifier

bkntc_payment_confirmed_backend

Fired when payment is confirmed from the admin panel.

Parameters:

ParameterTypeDescription
$appointment_idintThe ID of the appointment

bkntc_payment_canceled

Fired when a payment is canceled.

Parameters:

ParameterTypeDescription
$appointment_idintThe ID of the appointment

Staff Actions

bkntc_staff_created

Fired when a new staff member is created.

Parameters:

ParameterTypeDescription
$staff_idintThe ID of the newly created staff member
add_action('bkntc_staff_created', function ($staffId) {
    // Assign a WordPress user role, send welcome email, etc.
}, 10, 1);

bkntc_after_request_staff_save_staff

Fired after a staff member has been saved through the admin panel.

Parameters:

ParameterTypeDescription
$staff_arrarrayThe saved staff data array

Service & UI Actions

bkntc_service_model_scopes

Fired when service model query scopes are being applied.

Parameters:

ParameterTypeDescription
$class_namestringThe model class name

bkntc_service_defaults_serviceInf

Fired when default service information is being loaded.

Parameters:

ParameterTypeDescription
$service_objService|CollectionThe BookneticApp\Models\Service model object

bkntc_enqueue_assets

Fired when Booknetic admin panel assets are being enqueued. Use this to load addon scripts and styles only on the admin pages where they are needed.

Parameters:

ParameterTypeDescription
$modulestringThe current module name such as 'appointments' or 'calendar'
$actionstringThe current action
$view_pathstringThe path to the view file
add_action('bkntc_enqueue_assets', function ($module, $action, $viewPath) {
    if ($module === 'appointments') {
        wp_enqueue_script('my-addon-script', plugins_url('assets/script.js', __FILE__));
    }
}, 10, 3);

bkntc_module_calendar_loaded

Fired when the calendar module view is loaded.

Parameters: None

Booking Panel View Actions

These hooks let you inject custom HTML and UI fragments into specific parts of the booking panel.

bkntc_after_booking_panel_shortcode

Fired after the booking panel shortcode output.

Parameters: None

bkntc_after_information_inputs

Fired after the standard fields in the Information step of the booking panel. This is commonly used to add custom input fields.

Parameters:

ParameterTypeDescription
$service_objService|CollectionThe selected BookneticApp\Models\Service model object
add_action('bkntc_after_information_inputs', function ($serviceObj) {
    echo '<div class="form-group">';
    echo '<label>Special Request</label>';
    echo '<textarea name="special_request" class="form-control"></textarea>';
    echo '</div>';
}, 10, 1);

bkntc_service_step_footer

Fired at the bottom of the Services step.

Parameters:

ParameterTypeDescription
$services_arrarrayThe list of available services

bkntc_service_extras_step_footer

Fired at the bottom of the Service Extras step.

Parameters:

ParameterTypeDescription
$extras_arrarrayThe list of service extras

Dynamic Tab Item Actions

bkntc_tabitem_{tabSlug}_{slug}_{section}

This is a dynamic hook pattern for injecting content into admin panel tab items.

The hook name is built from:

  • {tabSlug} — the tab group identifier such as appointments
  • {slug} — the specific tab slug such as edit_details
  • {section} — the section inside the tab such as duration_after

Parameters:

ParameterTypeDescription
$tab_itemAbstractTabItemUIThe BookneticApp\Providers\UI\Abstracts\AbstractTabItemUI instance
$func_argsarrayAdditional arguments

Example:

add_action('bkntc_tabitem_appointments_edit_details_duration_after', function ($tabItem, $args) {
    echo '<div class="my-custom-section">Custom content here</div>';
}, 10, 2);

Filters

Filters are used when you need to change data before Booknetic saves it, renders it, returns it, or passes it into another layer.

Query & Data Filters

bkntc_appointment_insert_data

Modify appointment data before it is inserted into the database.

Parameters:

ParameterTypeDescription
$dataarrayThe appointment data to be inserted

Returns: array — The modified data array

add_filter('bkntc_appointment_insert_data', function ($data) {
    // Add a custom note to every new appointment
    $data['note'] = 'Created via custom integration';
    return $data;
}, 10, 1);

bkntc_appointment_update_data

Modify appointment data before it is updated in the database.

Parameters:

ParameterTypeDescription
$dataarrayThe appointment data to be updated

Returns: array

bkntc_appointment_reschedule

Modify appointment data during a reschedule operation.

Parameters:

ParameterTypeDescription
$dataarrayThe reschedule data

Returns: array

bkntc_appointment_data_service_extras

Modify service extras data for an appointment.

Parameters:

ParameterTypeDescription
$extrasarrayThe service extras array

Returns: array

bkntc_selected_time_slot_info

Modify selected time slot information during the booking flow.

Parameters:

ParameterTypeDescription
$slot_infoobjectThe time slot information object

Returns: object

bkntc_set_service_duration_frontend

Override the service duration displayed in the frontend booking panel.

Parameters:

ParameterTypeDescription
$service_objService|CollectionThe BookneticApp\Models\Service model object with duration information

Returns: Service\|Collection

bkntc_query_builder_global_scope

Control whether the global query scope should be applied, such as tenant filtering or staff-based filtering.

Parameters:

ParameterTypeDescription
$apply_scopeboolWhether to apply the global scope. Default is true

Returns: bool

add_filter('bkntc_query_builder_global_scope', function ($applyScope) {
    // Bypass global scope for specific operations
    return false;
}, 10, 1);

Booking Panel Rendering Filters

bkntc_booking_panel_render_staff_info

Modify staff information displayed in the staff selection step of the booking panel.

Parameters:

ParameterTypeDescription
$staff_infoarrayThe staff data array

Returns: array

add_filter('bkntc_booking_panel_render_staff_info', function ($staffInfo) {
    // Add a custom badge or modify display data
    foreach ($staffInfo as &$staff) {
        $staff['name'] .= ' (Available)';
    }
    return $staffInfo;
}, 10, 1);

bkntc_booking_panel_render_services_info

Modify service information displayed in the service selection step of the booking panel.

Parameters:

ParameterTypeDescription
$services_infoarrayThe services data array

Returns: array

bkntc_booking_panel_render_service_extras_info

Modify service extras information displayed in the booking panel.

Parameters:

ParameterTypeDescription
$extras_infoarrayThe service extras data array

Returns: array

bkntc_booking_panel_information_step_parameters

Modify the parameters passed to the Information step view.

Parameters:

ParameterTypeDescription
$paramsarrayThe view parameters array

Returns: array

bkntc_extras_step_components

Modify the components rendered in the Extras step.

Parameters:

ParameterTypeDescription
$componentsarrayThe extras step components

Returns: array

Calendar & Slot Filters

bkntc_busy_slots

Modify the list of busy or unavailable time slots. Calendar sync addons commonly use this to inject external calendar events into Booknetic availability.

Parameters:

ParameterTypeDescription
$busy_slotsarrayThe array of busy time slots
$calendar_serviceCalendarServiceThe BookneticApp\Backend\Appointments\Helpers\CalendarService instance

Returns: array

add_filter('bkntc_busy_slots', function ($busySlots, CalendarService $calendarService) {
    // Add external calendar events as busy slots
    $busySlots[] = [
        'start_time' => '09:00',
        'end_time'   => '10:00',
        'date'       => '2025-01-15',
        'staff_id'   => 1,
    ];
    return $busySlots;
}, 10, 2);

bkntc_show_busy_time_slot

Control whether fully booked time slots should still be visible in the booking panel.

Parameters:

ParameterTypeDescription
$showboolWhether to show busy slots. Default depends on settings

Returns: bool

bkntc_calendar_service_disable_slot

Control whether a specific time slot should be disabled and unselectable in the booking panel.

Parameters:

ParameterTypeDescription
$disableboolWhether to disable the slot

Returns: bool

bkntc_calendar_events

Modify events displayed on the admin calendar. Calendar sync addons use this to display external events alongside native Booknetic appointments.

Parameters:

ParameterTypeDescription
$eventsarrayThe array of calendar events
$start_timestringThe calendar view start time
$end_timestringThe calendar view end time
$staff_filtermixedThe active staff filter

Returns: array

add_filter('bkntc_calendar_events', function ($events, $startTime, $endTime, $staffFilter) {
    // Add events from an external source
    $events[] = [
        'id'        => 'external_1',
        'title'     => 'External Event',
        'start'     => '2025-01-15T09:00:00',
        'end'       => '2025-01-15T10:00:00',
        'color'     => '#ff9800',
    ];
    return $events;
}, 10, 4);

bkntc_filter_calendar_event_object

Modify a single calendar event object before it is rendered.

Parameters:

ParameterTypeDescription
$eventarrayThe calendar event data

Returns: array

Step Verification Filters

bkntc_post_step_verification

Add custom verification logic after a booking step is submitted. Return false to block step progression.

Parameters:

ParameterTypeDescription
$verifiedboolWhether the step passed verification

Returns: bool

bkntc_pre_step_verification

Add custom verification logic before a booking step is loaded.

Parameters:

ParameterTypeDescription
$verifiedboolWhether the step should proceed

Returns: bool

bkntc_hide_method_selecting

Control whether payment method selection should be hidden in the booking panel.

Parameters:

ParameterTypeDescription
$hideboolWhether to hide the payment method selection

Returns: bool

Capability & Permission Filters

bkntc_user_capability_filter

Override user capability checks. This is used by addons such as User Role Manager to implement custom permission logic.

Parameters:

ParameterTypeDescription
$canboolWhether the user has the capability. Default is true
$capabilitystringThe capability being checked

Returns: bool

add_filter('bkntc_user_capability_filter', function ($can, $capability) {
    // Restrict a specific capability for non-admin users
    if ($capability === 'appointments_delete' && !current_user_can('administrator')) {
        return false;
    }
    return $can;
}, 10, 2);

bkntc_capability_limit_filter

Override capability limits such as the maximum number of appointments or staff members.

Parameters:

ParameterTypeDescription
$limitintThe current limit value

Returns: int

bkntc_tenant_capability_filter

Override tenant-level capability checks. In SaaS mode, this is used to control access to features based on plan capabilities.

Parameters:

ParameterTypeDescription
$canboolWhether the tenant has the capability

Returns: bool

Appointment Status Filters

bkntc_appointment_statuses

Modify the list of available appointment statuses. This hook is used when you want to register custom appointment states.

Parameters:

ParameterTypeDescription
$statusesarrayThe array of status definitions

Returns: array

Each status item should follow this structure:

add_filter('bkntc_appointment_statuses', function ($statuses) {
    $statuses[] = [
        'slug'  => 'in_progress',
        'title' => 'In Progress',
        'color' => '#2196F3',
        'icon'  => 'fa fa-spinner',
        'busy'  => true,
    ];
    return $statuses;
}, 10, 1);

bkntc_price_name

Modify how a price label is displayed.

Parameters:

ParameterTypeDescription
$namestringThe price display name

Returns: string

Settings & Export Filters

bkntc_whitelist_translation_tables

Add database tables to the translation whitelist so addon data can participate in multi-language functionality.

Parameters:

ParameterTypeDescription
$tablesarrayThe array of whitelisted table names

Returns: array

bkntc_add_tables_for_export

Add custom database tables to the backup and export process.

Parameters:

ParameterTypeDescription
$tablesarrayThe array of table names to export

Returns: array

add_filter('bkntc_add_tables_for_export', function ($tables) {
    $tables[] = 'my_addon_table';
    return $tables;
}, 10, 1);

bkntc_labels_settings_translates

Modify translatable booking label settings.

Parameters:

ParameterTypeDescription
$labelsarrayThe array of label translations

Returns: array

bkntc_save_booking_labels_settings

Modify label data before it is saved.

Parameters:

ParameterTypeDescription
$labelsarrayThe label data to be saved

Returns: array

Localization & Response Filters

bkntc_localization

Add or modify localization strings passed into admin panel JavaScript. Use this hook to expose your addon strings to the frontend interface.

Parameters:

ParameterTypeDescription
$stringsarrayThe localization key-value array

Returns: array

add_filter('bkntc_localization', function ($strings) {
    $strings['my_addon_label'] = __('My Custom Label', 'my-addon');
    $strings['my_addon_confirm'] = __('Are you sure?', 'my-addon');
    return $strings;
}, 10, 1);

bkntc_frontend_localization

Works like bkntc_localization, but for frontend booking panel JavaScript.

Parameters:

ParameterTypeDescription
$stringsarrayThe localization key-value array

Returns: array

bkntc_response

Modify AJAX response data before it is returned to the client.

Parameters:

ParameterTypeDescription
$responsearrayThe response data array

Returns: array

bkntc_after_frontend_request_{method}

A dynamic filter that fires after a frontend AJAX request is processed. {method} is replaced with the actual AJAX method name.

Parameters:

ParameterTypeDescription
$resultmixedThe request result

Returns: mixed

Asset & Addon Filters

bkntc_booking_panel_assets

Modify the list of JavaScript and CSS assets loaded on the booking panel.

Parameters:

ParameterTypeDescription
$assetsarrayThe array of asset definitions

Returns: array

add_filter('bkntc_booking_panel_assets', function ($assets) {
    $assets[] = [
        'type' => 'js',
        'url'  => plugins_url('assets/my-booking-addon.js', __FILE__),
    ];
    $assets[] = [
        'type' => 'css',
        'url'  => plugins_url('assets/my-booking-addon.css', __FILE__),
    ];
    return $assets;
}, 10, 1);

bkntc_addons_load

Register your addon with Booknetic. This is the primary integration hook used by every addon loader.

Parameters:

ParameterTypeDescription
$addonsarrayThe array of registered addon class names

Returns: array

add_filter('bkntc_addons_load', function ($addons) {
    $addons[] = \BookneticAddon\MyAddon\MyAddonLoader::class;
    return $addons;
}, 10, 1);

bkntc_short_code_before_replace

Modify shortcode content before shortcode placeholders are replaced with actual values.

Parameters:

ParameterTypeDescription
$contentstringThe content containing shortcode placeholders

Returns: string

bkntc_short_code_after_replace

Modify shortcode content after all placeholders have been replaced.

Parameters:

ParameterTypeDescription
$contentstringThe content with replaced shortcodes

Returns: string

UI Filters

bkntc_datatable_after_render

Add custom content after a DataTable is rendered in the admin panel. This is useful for custom columns, summary rows, or extra interface fragments.

Parameters:

ParameterTypeDescription
$htmlstringThe HTML content after the datatable

Returns: string

bkntc_tabitem_{tabSlug}_{slug}_{section}_before

Inject HTML before a specific section in a tab item.

Returns: string

bkntc_tabitem_{tabSlug}_{slug}_{section}_end

Inject HTML at the end of a specific section in a tab item.

Returns: string

SaaS Module Actions

These hooks are available when the Booknetic SaaS module is active. They use the bkntcsaas_ prefix.

Initialization

bkntcsaas_init

Fired after the SaaS module is fully initialized.

Parameters: None

bkntcsaas_frontend

Fired when the SaaS frontend, such as signup and login pages, is loaded.

Parameters: None

bkntcsaas_backend

Fired when the SaaS admin panel is loaded.

Parameters: None

Tenant Lifecycle

bkntcsaas_tenant_created

Fired when a new tenant is created.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the newly created tenant
add_action('bkntcsaas_tenant_created', function ($tenantId) {
    // Set up default data for the new tenant
    // Send onboarding email, etc.
}, 10, 1);

bkntcsaas_tenant_deleted

Fired when a tenant is deleted.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the deleted tenant

bkntcsaas_tenant_subscribed

Fired when a tenant subscribes to a plan.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

bkntcsaas_tenant_unsubscribed

Fired when a tenant subscription is canceled or expires.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

bkntcsaas_tenant_paid

Fired when a tenant makes a payment.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

Tenant Authentication

bkntcsaas_tenant_sign_up_confirm

Fired when a signup confirmation email is sent to a tenant.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

bkntcsaas_tenant_sign_up_confirm_resend

Fired when a signup confirmation email is resent.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

bkntcsaas_tenant_sign_up_completed

Fired when a tenant completes signup, meaning the email is verified and the account is active.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

bkntcsaas_tenant_reset_password

Fired when a tenant requests a password reset.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant

bkntcsaas_tenant_reset_password_completed

Fired after a tenant password has been successfully reset.

Parameters:

ParameterTypeDescription
$tenant_idintThe ID of the tenant
$passwordstringThe new password

Billing

bkntcsaas_tenant_deposit_paid

Fired when a tenant deposit payment is processed.

Parameters:

ParameterTypeDescription
$billing_idintThe ID of the billing record

bkntcsaas_tenant_deposit_added

Fired when a deposit is added to a tenant account.

Parameters:

ParameterTypeDescription
$billing_idintThe ID of the billing record

Summary

Booknetic backend hooks provide a complete extension layer for core lifecycle events, booking flow processing, calendar integration, permissions, assets, UI injection, addon loading, and SaaS tenant workflows.

CategoryCount
Core Actions~50
Core Filters~55
SaaS Actions16
Dynamic Hooks (pattern-based)Multiple

Quick Reference: Most Used Hooks

HookTypeCommon Use Case
bkntc_appointment_createdActionLog bookings, sync to external systems, process custom form data
bkntc_appointment_after_mutationActionCalendar sync, video meeting creation, status change logging, deletion cleanup
bkntc_customer_createdActionCRM sync, welcome emails, user role assignment
bkntc_payment_confirmedActionInvoice generation, receipt emails, accounting sync
bkntc_addons_loadFilterRegister a custom addon
bkntc_appointment_insert_dataFilterModify appointment data before save
bkntc_busy_slotsFilterInject external calendar busy times
bkntc_calendar_eventsFilterAdd external events to the admin calendar
bkntc_appointment_statusesFilterAdd custom appointment statuses
bkntc_booking_panel_assetsFilterLoad custom JavaScript and CSS on the booking panel
bkntc_localizationFilterAdd translatable strings for admin JavaScript
bkntc_user_capability_filterFilterImplement custom permission logic
bkntc_enqueue_assetsActionLoad scripts on specific admin pages