dev/wordpress#109 fix bug when is_monetary is not checked #20929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This ensures the paymentProcessor is consistenly on the form regardless of is_monetary being checked
https://lab.civicrm.org/dev/wordpress/-/issues/109 highlights that it has been 'required'
even though we don't understand what it means. This removes that brittleness which we can't
'justify' from a logic point of view
Before
Fatal error if execute real-time monetary transactions is unchecked
After
poof
Technical Details
This fatal error would date back to Dec last year (when a type hint was added to the function ) but has not been reported until now - probably because users, like the code, mostly ignore that checkbox - but we should be tolerant given we don't know why it exists
The code comments indicate that this was thought to be unreachable & given the breakage was not picked up for 6 months I suspect we can remove it
Comments