Created
October 8, 2017 16:39
-
-
Save mlutfy/e0a85bee47478866ec17b23f98efc8fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function setPriceSetParameters($formValues) { | |
$this->_priceSetId = self::getPriceSetID($formValues); | |
$priceSetDetails = self::getPriceSetDetails($formValues); | |
$this->_priceSet = $priceSetDetails[$this->_priceSetId]; | |
// Call the buildAmount hook again to support extensions such as | |
// cdntaxcalculator, otherwise we cannot customize tax calculations. | |
// Setting the priceSetId this way is required by some extensions | |
// such as CiviDiscount. | |
$this->set('priceSetId', $this->_priceSetId); | |
CRM_Utils_Hook::buildAmount('membership', $this, $this->_priceSet['fields']); | |
// process price set and get total amount and line items. | |
$this->ensurePriceParamsAreSet($formValues); | |
return $formValues; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment