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

gw-progress-meter.php: Fixed an issue where refunds are included in the total paid count. #897

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

barthc
Copy link
Contributor

@barthc barthc commented Sep 26, 2024

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2711207909/71589

Summary

When the total paid count is calculated refunds are included, this PR will the issue by excluding refunds.

Copy link

github-actions bot commented Sep 26, 2024

Warnings
⚠️ When ready, don't forget to request reviews on this pull request from your fellow wizards.

Generated by 🚫 dangerJS against 418b485

@barthc barthc changed the title gravity-forms/gw-progress-meter.php: Fixed an issue where refunds are included in the total paid count. gw-progress-meter.php`: Fixed an issue where refunds are included in the total paid count. Sep 26, 2024
@barthc barthc changed the title gw-progress-meter.php`: Fixed an issue where refunds are included in the total paid count. gw-progress-meter.php: Fixed an issue where refunds are included in the total paid count. Sep 26, 2024
Comment on lines 118 to 119
AND e.status = 'active'
AND e.payment_status = 'Paid'\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spivurno Should we be adding this conditional in both of these spots? Thinking out loud, what if the form doesn't have payments wired up?

As an aside, should the partial entries bit be moved outside of the else to right above $sql?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claygriffiths We'll only want this in the first condition that checks for the presence of the payment_amount. This entry property is only populated if a payment feed is configured (regardless of the presence of product fields on the form).

As for partial entries, I don't think it's possible for a payment to be captured on a partial entry... maybe with Gravity Flow? My gut is to not change that until we have a bug report.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll only want this in the first condition that checks for the presence of the payment_amount.

Thought so but wasn't 100% sure 😄

As for partial entries, I don't think it's possible for a payment to be captured on a partial entry... maybe with Gravity Flow? My gut is to not change that until we have a bug report.

Makes sense!

@barthc barthc merged commit fcd66b1 into master Sep 27, 2024
3 checks passed
@barthc barthc deleted the barth/fix/71589-refunds branch September 27, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants