diff --git a/lib/setup.inc.php b/lib/setup.inc.php index 2907dab..9100f0f 100644 --- a/lib/setup.inc.php +++ b/lib/setup.inc.php @@ -35,19 +35,6 @@ function paymill_install_webhooks(){ }catch(Exception $e){ echo __($e->getMessage(),'paymill'); } - - // orphaned webhooks found, delete them - try{ - if($webhooks != false){ - foreach($webhooks as $hook){ - $GLOBALS['paymill_loader']->request_webhook = new $GLOBALS['paymill_loader']->request_webhook; // re-init class - $GLOBALS['paymill_loader']->request_webhook->setId($hook['id']); - $response = $GLOBALS['paymill_loader']->request->delete($GLOBALS['paymill_loader']->request_webhook); - } - } - }catch(Exception $e){ - echo __($e->getMessage(),'paymill'); - } } // still here? create new webhook @@ -82,7 +69,6 @@ function paymill_check_webhook(){ $webhook_found = false; $nothing_found = true; - $additional_webhooks = array(); $output = false; $output .= '

'.__('Webhook Status Check','paymill').'

'.__('Please note that Webhooks are currently used in WooCommerce integration only.','paymill').'

'; @@ -107,8 +93,6 @@ function paymill_check_webhook(){ $webhook_found .= '
'; $nothing_found = false; - }else{ - $additional_webhooks[] = $webhook['id']; } } } @@ -119,12 +103,7 @@ function paymill_check_webhook(){ }elseif($webhook_found){ $output .= $webhook_found; } - - if(count($additional_webhooks) > 0){ - $output .= '

'.__('Orphaned Webhooks found:').'

'.implode('
',$additional_webhooks).'
'; - $output .= '

'.__('These orphaned Webhooks should be deleted. Normally this will be done automaticly when saving new API keys via General Settings, but you can delete them via Paymill Dashboard, too.').'

'; - } - + $output .= ''; return $output; @@ -203,4 +182,4 @@ function paymill_install(){ }elseif(get_option('paymill_db_version') != PAYMILL_VERSION){ paymill_install(); } -?> \ No newline at end of file +?>