Reconcile remaining fields between scheduled reminders and legacy tokens
[civicrm-core.git] / CRM / Contribute / Tokens.php
index e0aa7b2054eed8d7044cfd4438f04bbe6c89f9a8..ca1b952cc7fb842cfc24209b783d14d6f0c90d87 100644 (file)
@@ -56,7 +56,7 @@ class CRM_Contribute_Tokens extends CRM_Core_EntityTokens {
    * @return array
    */
   protected function getExposedFields(): array {
-    return [
+    $fields = [
       'contribution_page_id',
       'source',
       'id',
@@ -75,7 +75,14 @@ class CRM_Contribute_Tokens extends CRM_Core_EntityTokens {
       'contribution_status_id',
       'financial_type_id',
       'payment_instrument_id',
+      'cancel_reason',
+      'amount_level',
+      'check_number',
     ];
+    if (CRM_Campaign_BAO_Campaign::isCampaignEnable()) {
+      $fields[] = 'campaign_id';
+    }
+    return $fields;
   }
 
   /**