Back-end Hooks
Tap into Booknetic core and SaaS events with WordPress-style actions and filters to customize behavior.
Tap into Booknetic core and SaaS events with WordPress-style actions and filters to customize behavior.
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.
Booknetic uses two hook types:
// 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.
All Booknetic hooks follow a consistent prefix-based naming pattern:
| Prefix | Scope |
|---|---|
bkntc_ | Core plugin hooks |
bkntcsaas_ | SaaS module hooks |
Actions are used when you want to react to something that has happened inside Booknetic.
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
bkntc_customer_created
Fired when a new customer is created.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The ID of the newly created customer |
$wp_password | string | The 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:
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The ID of the customer being edited |
bkntc_customer_deleted
Fired when a customer is deleted.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$token | string | The confirmation token |
$customer_id | int | The ID of the confirmed customer |
bkntc_customer_forgot_password
Fired when a customer requests a password reset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$token | string | The password reset token |
$customer_id | int | The ID of the customer |
bkntc_customer_reset_password
Fired after a customer password has been successfully reset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The ID of the customer |
bkntc_appointment_created
Fired when a new appointment is created, whether from the frontend booking panel or the backend admin side.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_data | AppointmentRequestData | The appointment request data object containing all appointment details |
AppointmentRequestData (BookneticApp\Backend\Appointments\Helpers\AppointmentRequestData) provides access to:
| Property | Type | Description |
|---|---|---|
->appointmentId | int | The created appointment ID |
->serviceId | int | Selected service ID |
->staffId | int | Assigned staff ID |
->locationId | int | Selected location ID |
->customerId | int | Customer ID |
->date | string | Appointment date in Y-m-d format |
->startTime | string | Start time in H:i format |
->endTime | string | End time in H:i format |
->paymentMethod | string | Payment method key |
->serviceInf | Service|Collection | Full service model object |
->staffInf | Staff|Collection | Full staff model object |
->locationInf | Location|Collection | Full location model object |
->appointmentInf | Appointment|Collection | Full 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_data | AppointmentRequestData | The 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_obj | AppointmentRequestData | The 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_obj | AppointmentRequestData | The 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_id | int|null | The ID of the appointment. May be null when called during new appointment creation in the payment confirmation flow |
This hook fires in these contexts:
bkntc_appointment_deletedadd_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:
| Parameter | Type | Description |
|---|---|---|
$appointment_id | int|null | The 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_id | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_arr | array | The appointment reschedule data |
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:
| Parameter | Type | Description |
|---|---|---|
$appointment_obj | AppointmentRequestData | The 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:
| Parameter | Type | Description |
|---|---|---|
$appointment_requests | AppointmentRequests | The BookneticApp\Backend\Appointments\Helpers\AppointmentRequests instance containing all booking requests |
bkntc_after_appointment_requests_validate
Fired after appointment request validation is completed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_requests | AppointmentRequests | The BookneticApp\Backend\Appointments\Helpers\AppointmentRequests instance |
bkntc_appointment_request_before_data_validate
Fired before a single appointment request data entry is validated.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_request_data | AppointmentRequestData | The BookneticApp\Backend\Appointments\Helpers\AppointmentRequestData instance |
bkntc_appointment_request_data_validate
Fired during validation of a single appointment request data entry.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_request_data | AppointmentRequestData | The 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:
| Parameter | Type | Description |
|---|---|---|
$steps_arr | array | The booking steps array |
bkntc_booking_step_confirmation_validation
Fired during confirmation step validation in the booking panel.
Parameters: None
bkntc_payment_confirmed
Fired when payment is confirmed for an appointment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_id | int | The ID of the appointment |
$method | string | Optional 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:
| Parameter | Type | Description |
|---|---|---|
$status | string | The payment status |
$custom_data | mixed | Custom data passed through the payment flow |
$method | string | The payment method identifier |
bkntc_payment_confirmed_backend
Fired when payment is confirmed from the admin panel.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_id | int | The ID of the appointment |
bkntc_payment_canceled
Fired when a payment is canceled.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$appointment_id | int | The ID of the appointment |
bkntc_staff_created
Fired when a new staff member is created.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$staff_id | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$staff_arr | array | The saved staff data array |
bkntc_service_model_scopes
Fired when service model query scopes are being applied.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$class_name | string | The model class name |
bkntc_service_defaults_serviceInf
Fired when default service information is being loaded.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$service_obj | Service|Collection | The 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:
| Parameter | Type | Description |
|---|---|---|
$module | string | The current module name such as 'appointments' or 'calendar' |
$action | string | The current action |
$view_path | string | The 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
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:
| Parameter | Type | Description |
|---|---|---|
$service_obj | Service|Collection | The 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:
| Parameter | Type | Description |
|---|---|---|
$services_arr | array | The list of available services |
bkntc_service_extras_step_footer
Fired at the bottom of the Service Extras step.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$extras_arr | array | The list of service extras |
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_afterParameters:
| Parameter | Type | Description |
|---|---|---|
$tab_item | AbstractTabItemUI | The BookneticApp\Providers\UI\Abstracts\AbstractTabItemUI instance |
$func_args | array | Additional 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 are used when you need to change data before Booknetic saves it, renders it, returns it, or passes it into another layer.
bkntc_appointment_insert_data
Modify appointment data before it is inserted into the database.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$data | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$data | array | The appointment data to be updated |
Returns: array
bkntc_appointment_reschedule
Modify appointment data during a reschedule operation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$data | array | The reschedule data |
Returns: array
bkntc_appointment_data_service_extras
Modify service extras data for an appointment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$extras | array | The service extras array |
Returns: array
bkntc_selected_time_slot_info
Modify selected time slot information during the booking flow.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$slot_info | object | The time slot information object |
Returns: object
bkntc_set_service_duration_frontend
Override the service duration displayed in the frontend booking panel.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$service_obj | Service|Collection | The 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:
| Parameter | Type | Description |
|---|---|---|
$apply_scope | bool | Whether 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);
bkntc_booking_panel_render_staff_info
Modify staff information displayed in the staff selection step of the booking panel.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$staff_info | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$services_info | array | The services data array |
Returns: array
bkntc_booking_panel_render_service_extras_info
Modify service extras information displayed in the booking panel.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$extras_info | array | The service extras data array |
Returns: array
bkntc_booking_panel_information_step_parameters
Modify the parameters passed to the Information step view.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$params | array | The view parameters array |
Returns: array
bkntc_extras_step_components
Modify the components rendered in the Extras step.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$components | array | The extras step components |
Returns: array
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:
| Parameter | Type | Description |
|---|---|---|
$busy_slots | array | The array of busy time slots |
$calendar_service | CalendarService | The 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:
| Parameter | Type | Description |
|---|---|---|
$show | bool | Whether 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:
| Parameter | Type | Description |
|---|---|---|
$disable | bool | Whether 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:
| Parameter | Type | Description |
|---|---|---|
$events | array | The array of calendar events |
$start_time | string | The calendar view start time |
$end_time | string | The calendar view end time |
$staff_filter | mixed | The 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:
| Parameter | Type | Description |
|---|---|---|
$event | array | The calendar event data |
Returns: array
bkntc_post_step_verification
Add custom verification logic after a booking step is submitted. Return false to block step progression.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$verified | bool | Whether the step passed verification |
Returns: bool
bkntc_pre_step_verification
Add custom verification logic before a booking step is loaded.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$verified | bool | Whether the step should proceed |
Returns: bool
bkntc_hide_method_selecting
Control whether payment method selection should be hidden in the booking panel.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$hide | bool | Whether to hide the payment method selection |
Returns: bool
bkntc_user_capability_filter
Override user capability checks. This is used by addons such as User Role Manager to implement custom permission logic.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$can | bool | Whether the user has the capability. Default is true |
$capability | string | The 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:
| Parameter | Type | Description |
|---|---|---|
$limit | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$can | bool | Whether the tenant has the capability |
Returns: bool
bkntc_appointment_statuses
Modify the list of available appointment statuses. This hook is used when you want to register custom appointment states.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$statuses | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$name | string | The price display name |
Returns: string
bkntc_whitelist_translation_tables
Add database tables to the translation whitelist so addon data can participate in multi-language functionality.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tables | array | The array of whitelisted table names |
Returns: array
bkntc_add_tables_for_export
Add custom database tables to the backup and export process.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tables | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$labels | array | The array of label translations |
Returns: array
bkntc_save_booking_labels_settings
Modify label data before it is saved.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$labels | array | The label data to be saved |
Returns: array
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:
| Parameter | Type | Description |
|---|---|---|
$strings | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$strings | array | The localization key-value array |
Returns: array
bkntc_response
Modify AJAX response data before it is returned to the client.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$response | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$result | mixed | The request result |
Returns: mixed
bkntc_booking_panel_assets
Modify the list of JavaScript and CSS assets loaded on the booking panel.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$assets | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$addons | array | The 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:
| Parameter | Type | Description |
|---|---|---|
$content | string | The content containing shortcode placeholders |
Returns: string
bkntc_short_code_after_replace
Modify shortcode content after all placeholders have been replaced.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$content | string | The content with replaced shortcodes |
Returns: string
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:
| Parameter | Type | Description |
|---|---|---|
$html | string | The 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
These hooks are available when the Booknetic SaaS module is active. They use the bkntcsaas_ prefix.
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
bkntcsaas_tenant_created
Fired when a new tenant is created.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the deleted tenant |
bkntcsaas_tenant_subscribed
Fired when a tenant subscribes to a plan.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
bkntcsaas_tenant_unsubscribed
Fired when a tenant subscription is canceled or expires.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
bkntcsaas_tenant_paid
Fired when a tenant makes a payment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
bkntcsaas_tenant_sign_up_confirm
Fired when a signup confirmation email is sent to a tenant.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
bkntcsaas_tenant_sign_up_confirm_resend
Fired when a signup confirmation email is resent.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The 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:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
bkntcsaas_tenant_reset_password
Fired when a tenant requests a password reset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
bkntcsaas_tenant_reset_password_completed
Fired after a tenant password has been successfully reset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tenant_id | int | The ID of the tenant |
$password | string | The new password |
bkntcsaas_tenant_deposit_paid
Fired when a tenant deposit payment is processed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$billing_id | int | The ID of the billing record |
bkntcsaas_tenant_deposit_added
Fired when a deposit is added to a tenant account.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$billing_id | int | The ID of the billing record |
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.
| Category | Count |
|---|---|
| Core Actions | ~50 |
| Core Filters | ~55 |
| SaaS Actions | 16 |
| Dynamic Hooks (pattern-based) | Multiple |
| Hook | Type | Common Use Case |
|---|---|---|
bkntc_appointment_created | Action | Log bookings, sync to external systems, process custom form data |
bkntc_appointment_after_mutation | Action | Calendar sync, video meeting creation, status change logging, deletion cleanup |
bkntc_customer_created | Action | CRM sync, welcome emails, user role assignment |
bkntc_payment_confirmed | Action | Invoice generation, receipt emails, accounting sync |
bkntc_addons_load | Filter | Register a custom addon |
bkntc_appointment_insert_data | Filter | Modify appointment data before save |
bkntc_busy_slots | Filter | Inject external calendar busy times |
bkntc_calendar_events | Filter | Add external events to the admin calendar |
bkntc_appointment_statuses | Filter | Add custom appointment statuses |
bkntc_booking_panel_assets | Filter | Load custom JavaScript and CSS on the booking panel |
bkntc_localization | Filter | Add translatable strings for admin JavaScript |
bkntc_user_capability_filter | Filter | Implement custom permission logic |
bkntc_enqueue_assets | Action | Load scripts on specific admin pages |