-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REF] Standardise methods of determining isTest #19417
Conversation
(Standard links)
|
3b02423
to
65e42c2
Compare
@eileenmcnaughton so if someone was to load up the live back office new membership form but with &action=preview then at the moment would that be treated as test or not? |
@seamuslee001 on the main flow it would be unchanged - for the obscure flow it would 'do what the main flow does' - which means these lines https://github.com/civicrm/civicrm-core/pull/19417/files#diff-e7ba7553d0e3638ecd45d305f95eabe0fec73ff33609a9cfb4cf0f148fb118e0L1954 (written for the front end pages) would not apply - which makes sense as we should not do something different for recurring than non recurring (which is the main flow) wrt is_test |
@@ -1950,12 +1948,7 @@ protected function legacyProcessRecurringContribution(array $params, $contactID) | |||
$recurParams['currency'] = $params['currency'] ?? NULL; | |||
$recurParams['payment_instrument_id'] = $params['payment_instrument_id']; | |||
|
|||
$recurParams['is_test'] = 0; | |||
if (($form->_action & CRM_Core_Action::PREVIEW) || | |||
(isset($form->_mode) && ($form->_mode == 'test')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensured removing $form->_action & CRM_Core_Action::PREVIEW doesn't affect the test mode processing on membership backoffice form.
@@ -1938,7 +1937,6 @@ protected function processContribution( | |||
* @return int | |||
*/ | |||
protected function legacyProcessRecurringContribution(array $params, $contactID): int { | |||
$form = $this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
safely deleted, no reference to $form present.
Did r-run on local, doesn't break scenario for test/live mode. Reviewed code, looks good to me. |
Thanks @monishdeb |
Overview
[REF] Standardise methods of determining isTest
Before
A bit ad hoc
After
used a function
Technical Details
Comments