Bug 41991

Summary: Suspend a plugin method or specific plugin class (per process or vhost)
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Plugin architectureAssignee: Marcel de Rooy <m.de.rooy>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, jonathan.druart, kyle, martin.renvoize, nick, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41991: Introduce SUSPEND_PLUGIN in Koha::Plugins->call
Bug 41991: Unit tests
Bug 41991: Unit tests

Description Marcel de Rooy 2026-03-05 09:05:21 UTC
This starts from a use case where I do want to suspend a certain item plugin hook for a specific command line process. But I dont want to disable the plugin for all processes.

So yes, this requires enough understanding from the admin who does that.

My idea is to introduce something similar here to the override_syspref construct. To allow suspending a plugin method or class via an environment variable.
Comment 1 Marcel de Rooy 2026-03-05 14:59:55 UTC
Any feedback appreciated.
Comment 2 Marcel de Rooy 2026-03-05 15:03:22 UTC
Created attachment 194514 [details] [review]
Bug 41991: Introduce SUSPEND_PLUGIN in Koha::Plugins->call

Test plan:
Add a SetEnv for your staff client in Apache to suspend a plugin class.
Verify that that specific plugin class was not run.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2026-03-05 15:03:24 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2026-03-05 15:03:53 UTC
Created attachment 194516 [details] [review]
Bug 41991: Unit tests

Test plan:
Run t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>