feat(integrations): add WP ERP action integration#155
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements a new integration for WP ERP, providing support for various CRM, HRM, and Accounting actions. The changes include backend logic for API handling and routing, along with a comprehensive frontend interface for authorization and field mapping. Key feedback points include preventing a potential fatal error when handling WP_Error objects, fixing a typo in an error message, utilizing the null coalescing operator for cleaner code, and removing a debug console.log statement.
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
There was a problem hiding this comment.
Pull request overview
Adds a new WP ERP action integration (Pro) so flows can execute CRM/HRM/Accounting operations in WP ERP, including action selection, field mapping, and dynamic option refresh.
Changes:
- Added WP ERP integration UI (authorization step, action selection, field mapping, utilities) + static action/field catalogs.
- Added backend WP ERP AJAX routes (authorize + refresh option lists) and an execution helper that dispatches actions via prefixed hooks with logging.
- Updated flow execution type normalization to map
WP ERP→WpErp, and added WP ERP branding/discovery entries.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/resource/img/integ/wpErp.webp | Adds WP ERP logo asset for UI. |
| frontend/src/components/Flow/New/SelectAction.jsx | Adds WP ERP to action selection list (with logo key). |
| frontend/src/components/AllIntegrations/WpErp/staticData.js | Defines WP ERP action catalog + field definitions for mapping. |
| frontend/src/components/AllIntegrations/WpErp/WpErpIntegLayout.jsx | Main configuration UI for WP ERP actions, mapping, and utility selectors. |
| frontend/src/components/AllIntegrations/WpErp/WpErpFieldMap.jsx | Field mapping row UI with required/optional handling and smart tags/custom values. |
| frontend/src/components/AllIntegrations/WpErp/WpErpCommonFunc.js | Shared helpers (mapping validation, mapping generation, refresh helpers). |
| frontend/src/components/AllIntegrations/WpErp/WpErpAuthorization.jsx | WP ERP “connect/authorize” step (plugin presence check). |
| frontend/src/components/AllIntegrations/WpErp/WpErpActions.jsx | Utilities UI (e.g., force delete for delete actions). |
| frontend/src/components/AllIntegrations/WpErp/WpErp.jsx | New integration “create” flow wrapper (stepper + save). |
| frontend/src/components/AllIntegrations/WpErp/EditWpErp.jsx | Edit screen wiring for WP ERP action configs. |
| frontend/src/components/AllIntegrations/NewInteg.jsx | Registers WP ERP in “new integration” routing. |
| frontend/src/components/AllIntegrations/IntegInfo.jsx | Registers WP ERP authorization/info rendering. |
| frontend/src/components/AllIntegrations/EditInteg.jsx | Registers WP ERP edit routing (and currently includes a debug log). |
| backend/Flow/Flow.php | Adds type normalization special-case for WP ERP → WpErp. |
| backend/Core/Util/AllTriggersName.php | Adds WP ERP entry to the (pro-inactive) trigger-name list. |
| backend/Actions/WpErp/WpErpController.php | Adds WP ERP authorize + option refresh endpoints + execute entrypoint. |
| backend/Actions/WpErp/Routes.php | Registers WP ERP AJAX routes. |
| backend/Actions/WpErp/RecordApiHelper.php | Implements action dispatch via hooks + request-data generation + logging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… integration components
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: RishadAlam <101513331+RishadAlam@users.noreply.github.com>
Merge conflicts resolved in commit |
Description
This PR adds WP ERP as a new action integration in Bit Integrations (Pro). Users can now connect WP ERP, choose a CRM/HRM/Accounting action, map trigger fields, and execute WP ERP actions through the existing flow engine.
Motivation & Context
WP ERP users needed a direct way to automate CRM, HRM, and Accounting operations from WordPress triggers without custom code. This change enables that automation path with guided configuration, action-specific field mapping, and runtime logging.
Related Links: (if applicable)
Type of Change
Key Changes
Integrations
WPERPtoWpErp.Frontend
Backend
Checklist
Changelog