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

fix: recalculate uses pagination and thus doesn't calculate correctly. #2973

Closed
1 task
EngineerAirhead opened this issue Mar 31, 2018 · 1 comment
Closed
1 task
Assignees

Comments

@EngineerAirhead
Copy link

User Story

As an Admin/Developer I want to be able to recalculate all the earnings so that I can see the correct amount in my overview if I didn't save the earnings correctly to the database.

Current Behavior

I'm currently working on a notification plugin that will send Donation information to an external party.
This resulted in a few earnings not being correctly stored under the form meta.
Trying to fix this with the recalculate option, doesn't take all the former donations into account for the form.

Expected Behavior

I expect to see all the donations being used to recalculate the earnings.

Possible Solution

https://github.com/WordImpress/Give/blob/release/2.1/includes/misc-functions.php#L1546
Change posts_per_page into number as stated in the API documentation on the website :)

Steps to Reproduce

  1. Create a lot of new donations.
  2. Prevent these donations from updating _give_form_earnings.
  3. Try recalculating the earnings for the specific form.

Tasks

  • Update mentioned line in code.
@DevinWalker DevinWalker self-assigned this Jan 11, 2019
@DevinWalker DevinWalker changed the title Recalculate uses pagination and thus doesn't calculate correctly. fix: recalculate uses pagination and thus doesn't calculate correctly. Jan 11, 2019
@DevinWalker
Copy link
Member

Thanks for reporting the issue and apologies for taking so long to get to it. Hopefully you've utilized the give_recount_form_stats_args filter in the meantime to correct the issue. It's resolved in the PR #3938 and will be released in 2.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants