Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to non-deprecated/cached functions for membership pricesets #18568

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

mattwire
Copy link
Contributor

Overview

CRM_Member_BAO_MembershipType::getMembershipTypeDetails() and CRM_Member_BAO_MembershipType::getMembershipTypeOrganization() functions are non-cached functions to get information about the membershipType.

Switch to CRM_Member_BAO_MembershipType::getMembershipType() which is a cached function to get information about the same thing.

Partial from #18398 which is attempting to rationalise and cleanup the use of multiple functions to get the same information.

Before

Using non-cached function to get membershipType detail.

After

Using "standard" cached function to get membershipType detail.

Technical Details

Pricesets are often built multiple times as forms load or are submitted. By using cached functions we reduce the number of database lookups to one when we need to get information about membershiptypes.

Comments

@civibot
Copy link

civibot bot commented Sep 23, 2020

(Standard links)

@eileenmcnaughton
Copy link
Contributor

The code looks correct. I checked & there was no cover on these lines & I couldn't justify merging without unless it was reaaallly hard to do - but it turned out not to be #18580

eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Sep 24, 2020
seamuslee001 added a commit that referenced this pull request Sep 24, 2020
@seamuslee001
Copy link
Contributor

Jenkins re test this please

@seamuslee001
Copy link
Contributor

@eileenmcnaughton if this test run passes are you good with this PR then?

@eileenmcnaughton
Copy link
Contributor

yep

@seamuslee001 seamuslee001 merged commit 182d98f into civicrm:master Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants