Skip to content
Snippets Groups Projects
Commit 59c27f91 authored by mattwire's avatar mattwire
Browse files

Code cleanup

parent 685d8999
No related branches found
No related tags found
No related merge requests found
......@@ -94,10 +94,12 @@ trait CRM_Core_Payment_MJWIPNTrait {
* If not set, we respect the value set on the ContributionRecur entity (for recurring contributions)
* or the value set on the ContributionPage entity (for non-recurring contributions).
*
* @param int $contributionID
*
* @return int
* @throws \CiviCRM_API3_Exception
*/
public function getSendEmailReceipt($contributionId) {
public function getSendEmailReceipt(int $contributionID) {
if (isset($this->is_email_receipt)) {
return (int) $this->is_email_receipt;
}
......@@ -117,7 +119,7 @@ trait CRM_Core_Payment_MJWIPNTrait {
try {
$this->is_email_receipt = \Civi\Api4\Contribution::get(FALSE)
->addSelect('contribution_page.is_email_receipt')
->addWhere('id', '=', $contributionId)
->addWhere('id', '=', $contributionID)
->execute()
->first()['contribution_page.is_email_receipt'] ?? 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment