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

perf(donation-forms): create a helper function to get the default level id. #3397

Closed
emgk opened this issue Jun 22, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@emgk
Copy link
Member

commented Jun 22, 2018

User Story

As a Developer, I want a helper function which returns the default level id and amount as well by donation form id so that I don't have to loop through each of the price levels to get the default level id and it's amount.

Also it will reduce the repitetion of code:
https://github.com/search?q=org%3AWordImpress+isset%28+%24price%5B%27_give_default%27%5D+%29+%26%26+%24price%5B%27_give_default%27%5D+%3D%3D%3D+%27default%27&type=Code

Current Behavior

Currently to get the default level id of the donation form I have to loop through each time to get the default level id of the donation form.

Expected Behavior

I expect to have a helper function which returns default level id by donation form id.

Possible Solution

Create a helper function with param { $form_id } to get the the default level id.

Tasks

  • Create a helper function to get the default level id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.