From e583eb370599b70008bbb3dc368fc1856fc4e063 Mon Sep 17 00:00:00 2001 From: Justin Freeman Date: Fri, 27 Jan 2023 11:13:46 +1100 Subject: [PATCH] CIVIEWAY-249 eWay Recurring does not appear in the available Payment Processors list when the extension is disabled and user has no way to fix this issue --- eWAYRecurring.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eWAYRecurring.php b/eWAYRecurring.php index ee59b45..1f4f065 100644 --- a/eWAYRecurring.php +++ b/eWAYRecurring.php @@ -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(); }