Skip to content

Skip the APIv3 delete protection wrapper for APIv4 - #839

Open
jfilter wants to merge 1 commit into
Project60:masterfrom
jfilter:api4-delete-protection
Open

jfilter wants to merge 1 commit into
Project60:masterfrom
jfilter:api4-delete-protection

Conversation

@jfilter

@jfilter jfilter commented Oct 28, 2026

Copy link
Copy Markdown

sepa_civicrm_apiWrappers() adds CRM_Sepa_Logic_ContributionProtector to every Contribution.delete, including APIv4. An APIv4 delete has no id parameter, so fromApiInput() raises Undefined array key "id", which fails headless tests of other extensions that delete contributions via APIv4. The protection itself still holds for APIv4 through sepa_civicrm_pre().

Changes:

  • Add the wrapper for APIv3 only.
  • Test that an APIv4 delete of a mandate's contribution is refused with the protection message. It errors without the fix.

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.

1 participant