Skip to content

Commit

Permalink
CIVIEWAY-249 eWay Recurring does not appear in the available Payment …
Browse files Browse the repository at this point in the history
…Processors list when the extension is disabled and user has no way to fix this issue
  • Loading branch information
agileware-justin committed Jan 27, 2023
1 parent cbec0ea commit e583eb3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eWAYRecurring.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function ewayrecurring_civicrm_postInstall() {
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_enable
*/
function ewayrecurring_civicrm_enable() {
// Ensure payment processor is active, will be deactivated if extension is disabled and user has no way to reactivate
\Civi\Api4\PaymentProcessorType::update()
->addValue('is_active', TRUE)
->addWhere('name', '=', 'eWay_Recurring')
->execute();
_ewayrecurring_civix_civicrm_enable();
}

Expand Down

0 comments on commit e583eb3

Please sign in to comment.