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 in
Code:
includes/modules/payment/paypalr.php
after line 293:
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();
}
to this:
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();
}
}
This just a quick fix for those who might have the same problem.