Skip to content

Commit

Permalink
SUP-43620 Add upgrade step for CiviCRM sites which have incorrect nam…
Browse files Browse the repository at this point in the history
…e for the Credit Card Expired option
  • Loading branch information
agileware-justin committed May 12, 2022
1 parent 8223ee8 commit 8b7a6cc
Show file tree
Hide file tree
Showing 3 changed files with 421 additions and 2 deletions.
23 changes: 23 additions & 0 deletions CRM/Expiredcreditcards/Upgrader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
use CRM_Expiredcreditcards_ExtensionUtil as E;

/**
* Collection of upgrade steps.
*/
class CRM_Expiredcreditcards_Upgrader extends CRM_Expiredcreditcards_Upgrader_Base {

/**
* Update 100 function
*
* @return TRUE on success
* @throws Exception
*/
public function upgrade_100() {
$this->ctx->log->info('Applying update 100 - Fix incorrect option value: Credit Card Expired');
// Fix some CiviCRM sites which have the incorrect name set for this option
CRM_Core_DAO::executeQuery('UPDATE `civicrm_option_value` SET `name` = "Credit_Card_Expired" WHERE `name` = "Credit Card Expired"');

return TRUE;
}

}
Loading

0 comments on commit 8b7a6cc

Please sign in to comment.