Skip to content

Updated donation checkout request handling#28351

Merged
9larsons merged 1 commit into
mainfrom
update-donation-checkout-handling
Jun 3, 2026
Merged

Updated donation checkout request handling#28351
9larsons merged 1 commit into
mainfrom
update-donation-checkout-handling

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

@9larsons 9larsons commented Jun 3, 2026

no ref

Aligns donation checkout session creation with the site's donation settings so the API path enforces the same enabled/disabled state already reflected in public settings and Portal.

  • routes donation checkout creation through the existing donations-enabled check
  • adds unit coverage for the disabled-donations path

no issue

- tightened handling of donation checkout session creation
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

Walkthrough

This PR changes the precondition for donation checkout in RouterController._createDonationCheckoutSession from checking Stripe configuration to checking whether donations are enabled via areDonationsEnabled(). When donations are disabled, the method throws DisabledFeatureError. The test suite is updated to stub the new areDonationsEnabled method and includes a new test case verifying that checkout fails with the appropriate error when donations are not enabled.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Updated donation checkout request handling' directly describes the main change: modifying how donation checkout session creation is handled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the alignment of donation checkout session creation with site donation settings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-donation-checkout-handling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@9larsons 9larsons enabled auto-merge (squash) June 3, 2026 22:19
@9larsons 9larsons merged commit ee7b991 into main Jun 3, 2026
50 checks passed
@9larsons 9larsons deleted the update-donation-checkout-handling branch June 3, 2026 22:35
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.

2 participants