# supportcandy/3.5.1/includes/admin/ai-chatbot/index.php

SupportCandy – AI Customer Support Ticket System &amp; Live Chatbot Agent, version 3.5.1. 41 lines.

- Page: https://pluginprobe.com/plugins/supportcandy/3.5.1/code/includes/admin/ai-chatbot/index.php
- Raw: https://pluginprobe.com/plugins/supportcandy/3.5.1/raw/includes/admin/ai-chatbot/index.php
- Modified: 2026-07-30T10:49:42+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/supportcandy/3.5.1/code/includes/admin/ai-chatbot/index.php#L10-L20`.

```php
<?php
$acb_settings = get_option( 'wpsc-ps-acb-chatbot-settings', array() );

// Load includes (settings, admin & cron hooks) so the settings UI stays reachable regardless of status.
foreach ( glob( __DIR__ . '/includes/*.php' ) as $filename ) {
	include_once $filename;
}

// Load the rest of the chatbot's functionality only when it's enabled.
if ( ! empty( $acb_settings['status'] ) && '1' === $acb_settings['status'] ) {

	// Load controller.
	foreach ( glob( __DIR__ . '/controller/*.php' ) as $filename ) {
		include_once $filename;
	}

	// Load tools.
	foreach ( glob( __DIR__ . '/tools/*.php' ) as $filename ) {
		include_once $filename;
	}

	// Load models.
	foreach ( glob( __DIR__ . '/models/*.php' ) as $filename ) {
		include_once $filename;
	}

	// Load providers.
	require_once __DIR__ . '/providers/class-wpsc-aibot-provider-interface.php';
	foreach ( glob( __DIR__ . '/providers/*.php' ) as $filename ) {
		if ( $filename === __DIR__ . '/providers/class-wpsc-aibot-provider-interface.php' ) {
			continue;
		}
		include_once $filename;
	}

	// Load ui templates.
	foreach ( glob( __DIR__ . '/templates/*.php' ) as $filename ) {
		include_once $filename;
	}
}

```
