CRM-17334 ensure installments is passed to membership rocessing if set
authoreileenmcnaugton <eileen@fuzion.co.nz>
Mon, 5 Oct 2015 04:28:13 +0000 (17:28 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Mon, 5 Oct 2015 04:28:13 +0000 (17:28 +1300)
(It could be set by a hook)

CRM/Contribute/Form/Contribution/Confirm.php

index b367b2f4f556e4cd8cb1e3fb8c774e1e8be58b69..461987e889b9cd3970508259f61edee1f4af8242 100644 (file)
@@ -2186,7 +2186,10 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
    * @param bool $isPayLater
    */
   protected function doMembershipProcessing($contactID, $membershipParams, $premiumParams, $isPayLater) {
-
+    // This could be set by a hook.
+    if (!empty($this->_params['installments'])) {
+      $membershipParams['installments'] = $this->_params['installments'];
+    }
     // added new parameter for cms user contact id, needed to distinguish behaviour for on behalf of sign-ups
     if (isset($this->_params['related_contact'])) {
       $membershipParams['cms_contactID'] = $this->_params['related_contact'];