Skip to content

Commit

Permalink
Remove helper function now that contribution settings is not weirdly …
Browse files Browse the repository at this point in the history
…stored

This is the only place that accesses this function / setting - it's as if it were defined properly all along
now - it was all just a dream.
  • Loading branch information
eileenmcnaughton authored and magnolia61 committed Mar 3, 2020
1 parent 334729a commit e870ad8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion CRM/Contribute/Page/UserDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function listContribution() {
'label' => ts('Pay Now'),
'url' => CRM_Utils_System::url('civicrm/contribute/transact', [
'reset' => 1,
'id' => CRM_Invoicing_Utils::getDefaultPaymentPage(),
'id' => Civi::settings()->get('default_invoice_page'),
'ccid' => $row['contribution_id'],
'cs' => $this->getUserChecksum(),
'cid' => $row['contact_id'],
Expand Down
18 changes: 0 additions & 18 deletions CRM/Invoicing/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,6 @@ public static function isInvoicingEnabled() {
return CRM_Utils_Array::value('invoicing', $invoiceSettings);
}

/**
* Function to call to determine default invoice page.
*
* Historically the invoicing was declared as a setting but actually
* set within contribution_invoice_settings (which stores multiple settings
* as an array in a non-standard way).
*
* We check both here. But will deprecate the latter in time.
*/
public static function getDefaultPaymentPage() {
$value = Civi::settings()->get('default_invoice_page');
if (is_numeric($value)) {
return $value;
}
$invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
return CRM_Utils_Array::value('default_invoice_page', $invoiceSettings);
}

/**
* Function to get the tax term.
*
Expand Down

0 comments on commit e870ad8

Please sign in to comment.