Rename CRM_Contribute_BAO_ManagePremiums to CRM_Contribute_BAO_Product and deprecate CRM_Contribute_BAO_ManagePremiums #12474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Ref #12435 @eileenmcnaughton as discussed.
Before
CRM_Contribute_BAO_ManagePremiums extends from CRM_Contribute_DAO_Product and is actually the BAO_Product class but has a different name (so the API doesn't use it and any other DAO/BAO magic does not pick it up). Also, it's really confusing when working with that code!
After
CRM_Contribute_BAO_ManagePremiums is deprecated (and extends from the new CRM_Contribute_BAO_Product class).
The CRM_Contribute_BAO_Product class is a renamed copy of the CRM_Contribute_BAO_ManagePremiums class.
Technical Details
BAO object named properly for Product entity.
Comments
The "Premiums" code has not been touched for around 5 years so I don't think it is used very often!