Skip to content

ADD: JetFormBuilder: use several payment gateways at once in jetformb…#609

Open
yurkodmtr wants to merge 17 commits intorelease/3.6.0from
issue/17484
Open

ADD: JetFormBuilder: use several payment gateways at once in jetformb…#609
yurkodmtr wants to merge 17 commits intorelease/3.6.0from
issue/17484

Conversation

@yurkodmtr
Copy link
Collaborator

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

🤖 AI PR Review

Risk level: medium

Review

This PR introduces the new "multi-gateway" module and block, allowing usage of multiple payment gateways within a single JetFormBuilder form, addressing the linked issue #17484.

Positive aspects:

  • The new multi-gateway block is well integrated into the existing plugin structure, with backend PHP rendering, frontend React block editor, and frontend block rendering all properly implemented.
  • The use of existing core APIs and hooks (eg. JetFBHooks) is consistent, facilitating maintainability and compatibility.
  • The manual and single gateway mode distinction is clearly handled, allowing backward compatibility and flexible configuration.
  • Vue and React build files are correctly updated.
  • Sanitation and escaping in PHP templates follow WPCS.

Points of attention:

  • The version constant changed from '3.5.6' to '3.5.61132112' which looks like an accidental numeric artifact. This should be corrected to a proper semantic version (eg. '3.5.7').
  • Some new JS bundles are quite large but this is due to adding fully fledged new functionality and not an immediate concern.
  • The multi-gateway setting reads from '_jf_gateways' post meta. Need to ensure that this meta is properly saved and updated on form updates. Tests covering saving form settings with multiple gateways enabled would be valuable.
  • There are no new PHP or JS unit/e2e tests shown in this diff; given the impact on payments processing, adding tests for the multi-gateway functionality is highly recommended.

Overall, this is a substantial and well-structured feature addition enabling multiple payment gateways within forms. Pending the version constant fix and addition of tests, this looks ready for integration.

Files of note:

  • modules/multi-gateway/**
  • modules/modules-controller.php (new module registration)
  • modules/gateways/assets/build/editor.js (gateway editor enhancements)

No security or backward compatibility issues found.

Suggested changelog entry

- ADD: Multi-gateway support allowing use of multiple payment gateways in a single form, with new multi-gateway block and settings UI

@github-actions
Copy link

🤖 AI PR Review

Risk level: medium

Review

This PR introduces the new Multi Gateway module and block, allowing usage of several payment gateways at once in JetFormBuilder forms. The changes include adding a new module class, React-based block editor UI, PHP rendering of the block, styles, and integration into the modules controller.

Security:

  • No direct form processing or nonce checks have been modified in this PR, so no immediate security issues observed.
  • The block template properly escapes output with wp_kses_post and esc_attr.

Performance:

  • The block rendering is efficient, relying on meta keys and avoiding heavy queries.
  • The React block editor integration looks clean and avoids redundant renders.

Backward Compatibility:

  • This adds a new module and block without changing existing blocks or public APIs.
  • Existing forms and gateways should not be affected.

Multisite & Scalability:

  • No multisite-specific code; standard meta usage is compatible.

Code Quality:

  • JS follows React best practices for the editor.
  • PHP uses consistent namespaces and class structures matching JetFormBuilder architecture.
  • Assets are properly registered and enqueued.

Recommendations:

  • Ensure thorough testing of multi-gateway selection on various forms.
  • Consider adding unit or integration tests if not already present.
  • Check for proper capability checks in any form submission handling that might integrate with this feature (not visible in this PR).

Overall, this is a well-structured feature addition that aligns with repository guidelines.

Suggested changelog entry

- ADD: Multi Gateway module and block to support multiple payment gateways simultaneously in forms

@github-actions
Copy link

🤖 AI PR Review

Risk level: medium

Review

This PR implements the ability to use multiple payment gateways simultaneously in JetFormBuilder forms, resolving issue #17484. The changes include updates to various compatibility files for Elementor, Bricks, and JetBooking integrations, as well as block styling adjustments predominantly changing 'Background Color' labels to 'Background' for UI consistency. Changes to front-end JS files improve booking field parsing and formula recalculations handling multiple macros.

Security-wise, the PR does not appear to affect form submission processing or nonce/capability checks, which is appropriate since the main change is the addition of multiple payment gateway support.

Performance considerations are handled well; new features integrate with existing hook/filter systems without introducing heavy queries or blocking operations.

Backward compatibility appears preserved, with no public API or schema-breaking changes noted.

Minor issues:

  • The diff contains many cosmetic label changes (e.g., "Background Color" to "Background"), which while improving UI consistency, make PR review noisier.
  • There is a callout to an action 'jet-form-builder/block-type/before-intall' which likely contains a typo ('intall' instead of 'install'). This might be a mistake unrelated to functional changes but should be fixed for clarity.
  • Several blocks now have a maybe_init_style_manager() method added that currently returns early with comments. This is fine but should be tracked to ensure future style manager support is considered.

Overall, the PR looks solid for the added feature.

Testing:

  • Please verify payment gateways integration works correctly when multiple gateways are enabled in a single form.
  • Check form rendering and submission in all supported editors (Gutenberg, Elementor, Bricks).
  • Validate the changed controls and labels in the styling UI for clarity and correctness.

No unit or integration tests are included in the patch for the multi-gateway feature, recommend adding test coverage for the new payment gateway selection and processing logic.

Suggested changelog entry

- ADD: Support for multiple payment gateways simultaneously in JetFormBuilder forms, enabling use of several gateways at once in a single form submission.

@github-actions
Copy link

🤖 AI PR Review

Risk level: medium

Review

This PR introduces the ability to use multiple payment gateways simultaneously in JetFormBuilder forms as per the linked issue #17484. The main functional changes are accompanied by updates in assets and minor code style improvements.

Security:

  • No direct security concerns are apparent from the diff.
  • Standard nonce and capabilities checks are presumably still in place for form submissions.

Performance:

  • No obvious performance regressions; asset bundles updated but no heavy logic changes.

Backward Compatibility:

  • No breaking changes detected; renaming of color label strings from 'Background Color' to 'Background' is a UI refinement only.

Code Quality:

  • CSS selector improvements and code cleanup in style managers enhance maintainability.
  • Style manager initialization has been refactored for some blocks, improving code clarity.
  • JS files for booking compatibility have been refactored for better macro handling.

Testing:

  • No new tests shown; given the scope (payment gateways), automated or manual tests covering multiple gateways simultaneously should be present or recommended.

Overall, the PR aligns well with project guidelines, focuses mainly on new payment gateway functionality with complementary improvements in styling and compatibility layers. Before merging, ensure adequate testing of multi-gateway forms especially for payment processing correctness and failure handling.

Suggested changelog entry

- ADD: Support for multiple payment gateways simultaneously in JetFormBuilder forms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments