From 6acadd6cb574e9ec6d1610dce947ad58a805f33c Mon Sep 17 00:00:00 2001 From: Dhrupo Nil Date: Tue, 15 Sep 2026 15:23:25 +0600 Subject: [PATCH] DOCS: Show the fluentform/loaded bootstrap for custom integrations The IntegrationManagerController page documented the constructor but never showed where to instantiate the class, and the global_addons filter reference pointed at a method that no longer applies it. Add a bootstrap example on fluentform/loaded, describe registerAdminHooks(), and correct the filter location to AddOnModule::getRegisteredAddOns(). --- .../integration-manager-controller/index.md | 14 ++++++++++++++ src/hooks/filters/integration.md | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/api/classes/integration-manager-controller/index.md b/src/api/classes/integration-manager-controller/index.md index 6fe4fc6..7428578 100644 --- a/src/api/classes/integration-manager-controller/index.md +++ b/src/api/classes/integration-manager-controller/index.md @@ -53,6 +53,18 @@ public function __construct(Application $application) } ``` +### Bootstrapping your integration +Instantiate your integration class on the `fluentform/loaded` action. It fires on every request once Fluent Forms is loaded and passes the Application instance your constructor needs. + +```php +/* + * Finally initialize the integration + */ +add_action('fluentform/loaded', function ($app) { + new MyAwesomeIntegration($app); +}); +``` + ### `addActiveNotificationType($types)` **Source:** `fluentform/app/Http/Controllers/IntegrationManagerController.php` (line 137) @@ -305,6 +317,8 @@ public function pushIntegration($integrations, $formId) ### `registerAdminHooks()` +Registers the integration on the **Integrations** screen (`fluentform/global_addons`) and, once enabled, its settings, feed and notification hooks. Call it from your constructor and instantiate the class on `fluentform/loaded` — see [Bootstrapping your integration](/api/classes/integration-manager-controller/#bootstrapping-your-integration). + **Source:** `fluentform/app/Http/Controllers/IntegrationManagerController.php` (line 54) --- diff --git a/src/hooks/filters/integration.md b/src/hooks/filters/integration.md index 8b311b5..afc28a0 100644 --- a/src/hooks/filters/integration.md +++ b/src/hooks/filters/integration.md @@ -302,7 +302,9 @@ add_filter('fluentform/global_addons', function ($addons) use ($isEnabled) { `apply_filters('fluentform/global_addons', $addons);` -This filter is located in FluentForm\app\Modules\AddOnModules -> showFluentAddOns() +This filter is located in FluentForm\App\Modules\AddOnModule -> getRegisteredAddOns() + +If you extend `IntegrationManagerController`, `registerAdminHooks()` adds this filter for you — see [Bootstrapping your integration](/api/classes/integration-manager-controller/#bootstrapping-your-integration).