feat(integrations): add Sensei LMS action integration#188
Conversation
Add the Sensei LMS action integration (Free side): controller with plugin authorize check and course/lesson/quiz refresh endpoints, RecordApiHelper that dispatches each of the 12 write actions to the Pro plugin via bit_integrations_sensei_lms_* hooks, routes, and the React UI (authorization, action select, course/lesson/quiz dropdowns, field map, wizard + edit). Register the integration in NewInteg, EditInteg, IntegInfo and SelectAction.
…ispatch Move the fixed-choice fields (post status, mark complete, grade type, lesson status) out of the field map into Utilities dropdowns stored on the config (selectedStatus / selectedMarkComplete / selectedGradeType / selectedLessonStatus), so the field map carries only free-form inputs. Replace the action-map lookup in RecordApiHelper::execute with an explicit switch-case per action, matching the FluentCart convention.
The Sensei action filters never use the utilities argument, so stop passing it through Hooks::apply — each filter now receives only the default response, the field data and the integration details.
There was a problem hiding this comment.
Code Review
This pull request introduces a new integration for Sensei LMS, adding backend helpers, controllers, and routes alongside frontend components for authorization, configuration, and field mapping. The feedback suggests adding error handling to the authorization API request, rebuilding non-persisted configuration fields on mount when editing the integration, and explicitly declaring several PHP methods as static since they do not access instance state.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
…lbacks EditSenseiLMS now rebuilds the non-persisted senseiLMSFields from the saved action and repopulates the course/lesson/quiz dropdowns on mount, leaving the saved field_map untouched. Add a .catch to the authorize request so the loading state resets and an error is shown on failure. Declare the refresh* route callbacks and generateReqDataFromFieldMap static to match how they are invoked.
Description
Adds Sensei LMS as an action integration in the free plugin: a 3-step UI (authorize → configure → save) exposing 12 write actions whose logic runs in the Pro add-on via
bit_integrations_sensei_lms_*hooks.Motivation & Context
Sensei LMS could already be used as a trigger but not as an action target. This lets flows drive Sensei — enrol learners, drive course/lesson/quiz progress, and create courses/lessons/certificates — from any trigger.
Type of Change
Key Changes
Integrations — Sensei LMS (action)
Backend
Actions/SenseiLMS/— Controller (authorize + course/lesson/quiz refresh endpoints),RecordApiHelper(per-actionswitchdispatch to the Pro hooks), Routes.Frontend
NewInteg,EditInteg,IntegInfo, andSelectAction.Checklist
Changelog