I did some quick fix so that PayPalr module does not do its checking every time you want to do some setting on other modules.
But I think a more efficient approach would be to do the API checking only when PayPalr module is installed or one of its settings is modified, and at most when it is selected. More than that and it is useless and just add a time penalty on all your other actions. Two or three modules doing this could render the admin modules page nearly unusable.
Here is the code I changed inafter line 293:Code:includes/modules/payment/paypalr.php
to this:PHP Code:$this->enabled = ($this->enabled === true && $this->validateConfiguration($curl_installed));
if ($this->enabled && IS_ADMIN_FLAG === true) {
// register/update known webhooks
$this->ppr->registerAndUpdateSubscribedWebhooks();
}
This just a quick fix for those who might have the same problem.PHP Code:if (IS_ADMIN_FLAG === false || ($this->enabled === true && $_GET['module'] === 'paypalr')) {
$this->enabled = ($this->enabled === true && $this->validateConfiguration($curl_installed));
if ($this->enabled && IS_ADMIN_FLAG === true) {
// register/update known webhooks
$this->ppr->registerAndUpdateSubscribedWebhooks();
}
}


Reply With Quote

