diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 3137d4803b5c..74d3f5b5defb 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -946,6 +946,10 @@ private function convertIsOverrideValue() { /** * Send email receipt. * + * @deprecated + * This function is shared with Batch_Entry which has limited overlap + * & needs rationalising. + * * @param CRM_Core_Form $form * Form object. * @param array $formValues @@ -1698,7 +1702,7 @@ public function submit() { $formValues['receipt_text_signup'] = $formValues['receipt_text']; // send email receipt $this->assignBillingName(); - $mailSend = self::emailReceipt($this, $formValues, $membership); + $mailSend = $this->emailMembershipReceipt(); $receiptSent = TRUE; } @@ -1945,4 +1949,16 @@ protected function isUpdateToExistingRecurringMembership() { return $isRecur; } + /** + * Send a receipt for the membership. + * + * @param array $formValues + * @param array $membership + * @return array + */ + protected function emailMembershipReceipt($formValues, $membership) { + $mailSend = self::emailReceipt($this, $formValues, $membership); + return [$membership, $mailSend]; + } + }