Issue #3483: parent_id not always available as index
[civicrm-core.git] / CRM / Contribute / Page / Tab.php
index 56411d1bc0e0c2288f8a2e27cfa45b8b8fe8366f..f8ab5c536e1c52402169fde3b970876f5f65f7bb 100644 (file)
@@ -82,15 +82,10 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
     $links[CRM_Core_Action::DISABLE] = [
       'name' => ts('Cancel'),
       'title' => ts('Cancel'),
-      'ref' => 'crm-enable-disable',
+      'url' => 'civicrm/contribute/unsubscribe',
+      'qs' => 'reset=1&crid=%%crid%%&cid=%%cid%%&context=' . $context,
     ];
 
-    if ($paymentProcessorObj->supports('cancelRecurring')) {
-      unset($links[CRM_Core_Action::DISABLE]['extra'], $links[CRM_Core_Action::DISABLE]['ref']);
-      $links[CRM_Core_Action::DISABLE]['url'] = "civicrm/contribute/unsubscribe";
-      $links[CRM_Core_Action::DISABLE]['qs'] = "reset=1&crid=%%crid%%&cid=%%cid%%&context={$context}";
-    }
-
     if ($paymentProcessorObj->supports('UpdateSubscriptionBillingInfo')) {
       $links[CRM_Core_Action::RENEW] = [
         'name' => ts('Change Billing Details'),